SolTechnology.Core.Blob
1.0.0
dotnet add package SolTechnology.Core.Blob --version 1.0.0
NuGet\Install-Package SolTechnology.Core.Blob -Version 1.0.0
<PackageReference Include="SolTechnology.Core.Blob" Version="1.0.0" />
<PackageVersion Include="SolTechnology.Core.Blob" Version="1.0.0" />
<PackageReference Include="SolTechnology.Core.Blob" />
paket add SolTechnology.Core.Blob --version 1.0.0
#r "nuget: SolTechnology.Core.Blob, 1.0.0"
#:package SolTechnology.Core.Blob@1.0.0
#addin nuget:?package=SolTechnology.Core.Blob&version=1.0.0
#tool nuget:?package=SolTechnology.Core.Blob&version=1.0.0
Overview
The SolTechnology.Core.Blob library provides minimum functionality needed for Azure Blob storage connection. It handles needed services registration and configuration and additionally provides BlobContainerClientExtensions methods for convinient read and write operation.
Registration
For installing the library, reference SolTechnology.Core.Blob nuget package and invoke AddSolBlob() service collection extension method:
services.AddSolBlob(blobConfiguration);
Configuration
- The first option is to create an appsettings.json section:
"Configuration": {
"Blob": {
"ConnectionString": "UseDevelopmentStorage=true"
}
}
- Alternatevely the same settings can be provided by optional parameter during registration:
var blobConfiguration = new BlobConfiguration
{
ConnectionString = "UseDevelopmentStorage=true"
};
services.AddSolBlob(blobConfiguration);
Usage
- Inject IBlobConnectionFactory and create blobContainerClient using chosen container name
public PlayerStatisticsRepository(IBlobConnectionFactory blobConnectionFactory)
{
_client = blobConnectionFactory.CreateConnection(ContainerName);
}
- Invoke read and write operation
await _client.WriteToBlob(blobName, content);
var result = await _client.ReadFromBlob<ContentType>(blobName);
- The libary supports two serialization formats:
- json as default for high redability
- avro for data compression and cost reduction
Testing
The companion package SolTechnology.Core.Blob.Testing provides AzuriteFixture — a
Testcontainers-backed Azurite
container (the Azure Storage emulator) for component tests. Reference it from test projects only. Full reference:
Blob.Testing.md.
// Assembly-level [OneTimeSetUp]
AzuriteFixture = new AzuriteFixture();
await AzuriteFixture.InitializeAsync();
var configuration = new TestConfigurationBuilder()
.AddJsonFile("appsettings.tests.json")
.Override("Blob:ConnectionString", AzuriteFixture.ConnectionString)
.Build();
// Arrange a blob container in a test:
var container = await AzuriteFixture.CreateBlobContainerAsync("dossier");
await AzuriteFixture.ClearAsync(); // between-test reset (drops all blob containers)
await AzuriteFixture.DisposeAsync(); // no-op when TESTCONTAINERS_REUSE=true
Container lifetime / reuse follows the shared model in theQuality.md → Container lifetime & reuse.
| 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
- AvroConvert (>= 3.4.16)
- Azure.Storage.Blobs (>= 12.29.0)
- Microsoft.Extensions.Configuration (>= 10.0.9)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.9)
- Microsoft.Extensions.DependencyInjection (>= 10.0.9)
- Microsoft.Extensions.Options (>= 10.0.9)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 92 | 7/6/2026 |