Soenneker.Blob.Container 4.0.3014

Prefix Reserved
dotnet add package Soenneker.Blob.Container --version 4.0.3014
                    
NuGet\Install-Package Soenneker.Blob.Container -Version 4.0.3014
                    
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.3014" />
                    
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.3014" />
                    
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.3014
                    
#r "nuget: Soenneker.Blob.Container, 4.0.3014"
                    
#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.3014
                    
#: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.3014
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Blob.Container&version=4.0.3014
                    
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.3014 180 10/1/2026
4.0.3013 130 9/30/2026
4.0.3012 136 9/30/2026
4.0.3011 230 9/29/2026
4.0.3010 218 9/29/2026
4.0.3009 1,999 9/25/2026
4.0.3008 374 9/25/2026
4.0.3006 238 9/25/2026
4.0.3005 195 9/25/2026
4.0.3004 260 9/25/2026
4.0.3003 159 9/24/2026
4.0.3002 142 9/24/2026
4.0.3001 648 9/17/2026
4.0.3000 196 9/16/2026
4.0.2999 180 9/16/2026
4.0.2997 219 9/16/2026
4.0.2996 296 9/16/2026
4.0.2995 153 9/16/2026
4.0.2994 281 9/15/2026
4.0.2992 472 9/13/2026
Loading failed

Updated Soenneker.Extensions.Configuration to 4.0.898