Skip to content

Add AzureBlobStorage factory method accepting BlobServiceClient#137

Merged
robinrodricks merged 2 commits intorobinrodricks:developfrom
RicoSuter:feature/azure-blob-service-client-factory
Apr 4, 2026
Merged

Add AzureBlobStorage factory method accepting BlobServiceClient#137
robinrodricks merged 2 commits intorobinrodricks:developfrom
RicoSuter:feature/azure-blob-service-client-factory

Conversation

@RicoSuter
Copy link
Copy Markdown
Contributor

@RicoSuter RicoSuter commented Mar 30, 2026

Summary

  • Adds StorageFactory.Blobs.AzureBlobStorage(blobServiceClient) extension method to create IAzureBlobStorage directly from a BlobServiceClient
  • Enables users to construct a BlobServiceClient with a native Azure connection string and pass it in, without needing reflection workarounds
  • Matches the API documented in the wiki

Note: Wiki is outdated

The Azure Blob Storage wiki page references method names from the old Storage.NET API:

Wiki documents Actual method
StorageFactory.Modules.UseAzureStorage() UseAzureBlobStorage()
StorageFactory.Blobs.AzureBlobStorage(accountName, accountKey) AzureBlobStorageWithSharedKey(accountName, key)
StorageFactory.Blobs.AzureBlobDevelopmentStorage() AzureBlobStorageWithLocalEmulator()
StorageFactory.Blobs.AzureBlobStorage(client) Did not exist — added in this PR
StorageFactory.Blobs.AzureBlobStorageFromSas(sasUrl) AzureBlobStorageWithSas(sas)
AccountSasPolicy(DateTime, TimeSpan) AccountSasPolicy(DateTimeOffset, TimeSpan)

The wiki also doesn't document: AzureBlobStorageWithAzureAd, AzureBlobStorageWithTokenCredential, AzureBlobStorageWithMsi, or the AzureCloudEnvironment overloads.

Allows creating IAzureBlobStorage directly from a BlobServiceClient instance,
matching the documented API in the wiki and removing the need for reflection workarounds.
@robinrodricks robinrodricks merged commit 7edf465 into robinrodricks:develop Apr 4, 2026
1 check passed
@robinrodricks
Copy link
Copy Markdown
Owner

Yes wiki is outdated for many sections. Thanks, will fix what you have highlighted.

@robinrodricks
Copy link
Copy Markdown
Owner

Fixed wiki https://github.com/robinrodricks/FluentStorage/wiki/Azure-Blob-Storage

Please let me know if you spot any issues, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants