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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Blob.Container" Version="4.0.2982" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Blob.Container" Version="4.0.2982" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Blob.Container" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Blob.Container --version 4.0.2982
                    
#r "nuget: Soenneker.Blob.Container, 4.0.2982"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Blob.Container@4.0.2982
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Blob.Container&version=4.0.2982
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Blob.Container&version=4.0.2982
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed

Updated Multiple NuGet packages