Skip to content

Add AzureBlobStorage factory method accepting BlobServiceClient#137

Open
RicoSuter wants to merge 2 commits intorobinrodricks:developfrom
RicoSuter:feature/azure-blob-service-client-factory
Open

Add AzureBlobStorage factory method accepting BlobServiceClient#137
RicoSuter wants to merge 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.
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.

1 participant