Soenneker.Blob.Container
4.0.2982
Prefix Reserved
dotnet add package Soenneker.Blob.Container --version 4.0.2982
NuGet\Install-Package Soenneker.Blob.Container -Version 4.0.2982
<PackageReference Include="Soenneker.Blob.Container" Version="4.0.2982" />
<PackageVersion Include="Soenneker.Blob.Container" Version="4.0.2982" />
<PackageReference Include="Soenneker.Blob.Container" />
paket add Soenneker.Blob.Container --version 4.0.2982
#r "nuget: Soenneker.Blob.Container, 4.0.2982"
#:package Soenneker.Blob.Container@4.0.2982
#addin nuget:?package=Soenneker.Blob.Container&version=4.0.2982
#tool nuget:?package=Soenneker.Blob.Container&version=4.0.2982
Soenneker.Blob.Container
Creates missing Azure Blob containers and caches their BlobContainerClient instances for reuse.
Install
dotnet add package Soenneker.Blob.Container
Configure the required connection string:
{
"Azure": {
"Storage": {
"Blob": {
"ConnectionString": "<connection string>"
}
}
}
}
Supply the real value through an environment-specific secret provider.
Register the singleton utility in Program.cs:
using Soenneker.Blob.Container.Registrars;
builder.Services.AddBlobContainerUtilAsSingleton();
Singleton is the normal lifetime because the utility owns the container-client and HTTP-client caches. Scoped registration is available for specialized hosts, while its HTTP-client cache remains singleton.
Resolve a container
using Azure.Storage.Blobs;
using Soenneker.Blob.Container.Abstract;
BlobContainerClient invoices = await blobContainers.Get(
"Invoices",
cancellationToken: cancellationToken);
The name is normalized to lowercase, so this example targets invoices. The first lookup atomically creates the container if it is missing; concurrent creators do not require a separate existence check.
The returned Azure SDK client can be used directly:
await foreach (BlobItem blob in invoices.GetBlobsAsync(
cancellationToken: cancellationToken))
{
Console.WriteLine(blob.Name);
}
Public access
Containers are private by default:
BlobContainerClient assets = await blobContainers.Get(
"public-assets",
PublicAccessType.Blob,
cancellationToken);
publicAccessType applies only when the container is created. It does not read, verify, or change the access policy of an existing container. Clients are cached by normalized container name, so every caller must use one consistent creation policy for that container.
Public access can expose stored data without authentication. Prefer PublicAccessType.None and issue narrowly scoped SAS URLs when external access is required.
Operational behavior
- Cancellation stops pending work; it does not undo work that has already completed.
- Container creation requires credentials with the appropriate storage-account permission.
- A successful lookup is cached for the utility lifetime. External container deletion is not detected by the cache; later SDK operations will report that the container is missing.
- Dependency injection disposes the utility and its shared transport. Manually created instances must be disposed.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Azure.Storage.Blobs (>= 12.29.2)
- Soenneker.Extensions.Configuration (>= 4.0.883)
- Soenneker.Utils.HttpClientCache (>= 4.0.2070)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Soenneker.Blob.Container:
| Package | Downloads |
|---|---|
|
Soenneker.Blob.Client
A utility library for Azure Blob client accessibility |
|
|
Soenneker.Blob.Fetch
A utility library for Azure Blob fetch (metadata) operations |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.2982 | 0 | 9/9/2026 |
| 4.0.2981 | 0 | 9/9/2026 |
| 4.0.2980 | 0 | 9/9/2026 |
| 4.0.2979 | 0 | 9/8/2026 |
| 4.0.2978 | 131 | 9/8/2026 |
| 4.0.2977 | 97 | 9/8/2026 |
| 4.0.2976 | 132 | 9/8/2026 |
| 4.0.2975 | 152 | 9/7/2026 |
| 4.0.2974 | 168 | 9/7/2026 |
| 4.0.2972 | 313 | 9/5/2026 |
| 4.0.2971 | 58 | 9/5/2026 |
| 4.0.2970 | 287 | 9/4/2026 |
| 4.0.2969 | 207 | 9/4/2026 |
| 4.0.2968 | 126 | 9/4/2026 |
| 4.0.2967 | 293 | 9/4/2026 |
| 4.0.2966 | 252 | 9/4/2026 |
| 4.0.2964 | 227 | 9/3/2026 |
| 4.0.2963 | 286 | 9/1/2026 |
| 4.0.2962 | 210 | 9/1/2026 |
| 4.0.2961 | 220 | 8/31/2026 |
Updated Multiple NuGet packages