Soenneker.Blob.Service 11.0.2674

Prefix Reserved
dotnet add package Soenneker.Blob.Service --version 11.0.2674
                    
NuGet\Install-Package Soenneker.Blob.Service -Version 11.0.2674
                    
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.Service" Version="11.0.2674" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Blob.Service" Version="11.0.2674" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Blob.Service" />
                    
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.Service --version 11.0.2674
                    
#r "nuget: Soenneker.Blob.Service, 11.0.2674"
                    
#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.Service@11.0.2674
                    
#: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.Service&version=11.0.2674
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Blob.Service&version=11.0.2674
                    
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.Service

Provides a lazily created, reusable Azure BlobServiceClient through dependency injection.

Installation

dotnet add package Soenneker.Blob.Service

Configuration

{
  "Azure": {
    "Storage": {
      "Blob": {
        "ConnectionString": "<connection string>"
      }
    }
  }
}

Registration

Register one shared service client for the application:

using Microsoft.Extensions.DependencyInjection;
using Soenneker.Blob.Service.Registrars;

services.AddBlobServiceUtilAsSingleton();

AddBlobServiceUtilAsScoped() creates one utility and client per dependency-injection scope.

Usage

using Azure.Storage.Blobs;
using Soenneker.Blob.Service.Abstract;

public sealed class StorageInventory
{
    private readonly IBlobServiceUtil _service;

    public StorageInventory(IBlobServiceUtil service)
    {
        _service = service;
    }

    public async ValueTask<IReadOnlyList<string>> GetContainerNames(
        CancellationToken cancellationToken)
    {
        BlobServiceClient client = await _service.Get(cancellationToken);
        var names = new List<string>();

        await foreach (var container in client.GetBlobContainersAsync(
                           cancellationToken: cancellationToken))
        {
            names.Add(container.Name);
        }

        return names;
    }
}

The returned object is the standard Azure SDK client, so container enumeration, account properties, container clients, and other service-level operations remain available directly through Azure's API.

Lifecycle

  • The first Get creates the client from Azure:Storage:Blob:ConnectionString; later calls on the same utility return the same instance.
  • The cancellation token passed to Get applies to lazy initialization. Pass a token separately to each Azure SDK operation.
  • The utility owns its cached HTTP transport. Let the dependency-injection container dispose IBlobServiceUtil; consumers should not dispose infrastructure obtained from it.
  • The singleton registration is appropriate for most applications because Azure SDK clients are designed for reuse.
  • A scoped registration owns an isolated HTTP-client cache entry, so disposing one scope does not invalidate another scope's client.
Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Soenneker.Blob.Service:

Package Downloads
Soenneker.Blob.Suite

A concoction of Azure Blob Storage utilities and libraries

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.2674 153 11/21/2026
11.0.2673 145 11/19/2026
11.0.2671 109 11/18/2026
11.0.2669 122 11/18/2026
11.0.2667 172 11/15/2026
11.0.2666 121 11/15/2026
11.0.2665 143 11/11/2026
11.0.2664 138 11/11/2026
11.0.2663 109 11/11/2026
11.0.2662 108 11/11/2026
11.0.2661 108 11/11/2026
11.0.2660 132 11/10/2026
11.0.2659 153 11/3/2026
11.0.2658 116 11/3/2026
11.0.2657 119 11/3/2026
11.0.2656 114 11/3/2026
11.0.2655 200 10/27/2026
11.0.2654 148 10/26/2026
11.0.2652 114 10/26/2026
11.0.2651 101 10/26/2026
Loading failed

Update dependency Azure.Storage.Blobs to 12.30.2 (#3390)