Soenneker.Blob.Service
4.0.2557
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Blob.Service --version 4.0.2557
NuGet\Install-Package Soenneker.Blob.Service -Version 4.0.2557
<PackageReference Include="Soenneker.Blob.Service" Version="4.0.2557" />
<PackageVersion Include="Soenneker.Blob.Service" Version="4.0.2557" />
<PackageReference Include="Soenneker.Blob.Service" />
paket add Soenneker.Blob.Service --version 4.0.2557
#r "nuget: Soenneker.Blob.Service, 4.0.2557"
#:package Soenneker.Blob.Service@4.0.2557
#addin nuget:?package=Soenneker.Blob.Service&version=4.0.2557
#tool nuget:?package=Soenneker.Blob.Service&version=4.0.2557
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
Getcreates the client fromAzure:Storage:Blob:ConnectionString; later calls on the same utility return the same instance. - The cancellation token passed to
Getapplies 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 | 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.869)
- Soenneker.Utils.HttpClientCache (>= 4.0.2044)
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 |
|---|---|---|
| 4.0.2564 | 0 | 9/3/2026 |
| 4.0.2563 | 107 | 9/1/2026 |
| 4.0.2562 | 75 | 8/31/2026 |
| 4.0.2561 | 49 | 8/31/2026 |
| 4.0.2560 | 59 | 8/31/2026 |
| 4.0.2559 | 95 | 8/31/2026 |
| 4.0.2558 | 75 | 8/31/2026 |
| 4.0.2557 | 124 | 8/31/2026 |
| 4.0.2556 | 125 | 8/30/2026 |
| 4.0.2555 | 85 | 8/30/2026 |
| 4.0.2554 | 83 | 8/30/2026 |
| 4.0.2553 | 144 | 8/30/2026 |
| 4.0.2552 | 76 | 8/30/2026 |
| 4.0.2551 | 112 | 8/30/2026 |
| 4.0.2550 | 94 | 8/30/2026 |
| 4.0.2549 | 75 | 8/29/2026 |
| 4.0.2548 | 75 | 8/29/2026 |
| 4.0.2547 | 79 | 8/29/2026 |
| 4.0.2546 | 74 | 8/29/2026 |
| 4.0.2545 | 76 | 8/29/2026 |
Update dependency Soenneker.Extensions.Configuration to 4.0.869 (#3234)