Cirreum.Storage.Azure
1.0.8
dotnet add package Cirreum.Storage.Azure --version 1.0.8
NuGet\Install-Package Cirreum.Storage.Azure -Version 1.0.8
<PackageReference Include="Cirreum.Storage.Azure" Version="1.0.8" />
<PackageVersion Include="Cirreum.Storage.Azure" Version="1.0.8" />
<PackageReference Include="Cirreum.Storage.Azure" />
paket add Cirreum.Storage.Azure --version 1.0.8
#r "nuget: Cirreum.Storage.Azure, 1.0.8"
#:package Cirreum.Storage.Azure@1.0.8
#addin nuget:?package=Cirreum.Storage.Azure&version=1.0.8
#tool nuget:?package=Cirreum.Storage.Azure&version=1.0.8
Cirreum.Storage.Azure
Azure Blob Storage implementation for the Cirreum Storage abstraction
Overview
Cirreum.Storage.Azure provides a robust Azure Blob Storage implementation of the Cirreum Storage abstraction, enabling seamless cloud storage operations with automatic service registration, health monitoring, and flexible configuration options.
Features
- Unified Storage Interface: Implements
ICloudStorageClientfor consistent storage operations across cloud providers - Automatic Registration: Service provider pattern with configuration-driven auto-registration
- Flexible Authentication: Supports both connection strings and URI-based configuration with DefaultAzureCredential
- Health Monitoring: Built-in health checks with configurable options and memory caching
- Multi-tenant Support: Keyed service registration for multiple storage accounts
- Comprehensive Operations: Full blob lifecycle management including upload, download, metadata, tags, and leasing
Installation
dotnet add package Cirreum.Storage.Azure
Quick Start
Configuration
Add Azure Blob Storage configuration to your appsettings.json:
{
"ServiceProviders": {
"Storage": {
"Azure": {
"Default": {
"ConnectionString": "your-connection-string-or-uri"
}
}
}
}
}
Registration
var builder = WebApplication.CreateBuilder(args);
// Register all configured service providers
builder.Services.AddServiceProviders(builder.Configuration);
var app = builder.Build();
Usage
public class FileService
{
private readonly ICloudStorageClient _storageClient;
public FileService(ICloudStorageClient storageClient)
{
_storageClient = storageClient;
}
public async Task<string?> UploadFileAsync(string containerId, string fileName, string filePath)
{
await _storageClient.CreateIfNotExistsAsync(containerId);
return await _storageClient.UploadFileAsync(containerId, fileName, filePath, overwrite: true);
}
public async Task<bool> FileExistsAsync(string containerId, string fileName)
{
return await _storageClient.ExistsAsync(containerId, fileName);
}
}
## Advanced Configuration
### Multiple Storage Accounts
```json
{
"ServiceProviders": {
"Storage": {
"Azure": {
"Primary": {
"ConnectionString": "primary-storage-connection-string"
},
"Backup": {
"ConnectionString": "backup-storage-connection-string"
}
}
}
}
}
// Inject specific storage client
public class FileService
{
private readonly ICloudStorageClient _primaryStorage;
private readonly ICloudStorageClient _backupStorage;
public FileService(
[FromKeyedServices("Primary")] ICloudStorageClient primaryStorage,
[FromKeyedServices("Backup")] ICloudStorageClient backupStorage)
{
_primaryStorage = primaryStorage;
_backupStorage = backupStorage;
}
}
URI-based Configuration with Managed Identity
{
"ServiceProviders": {
"Storage": {
"Azure": {
"Default": {
"ConnectionString": "https://yourstorageaccount.blob.core.windows.net"
}
}
}
}
}
Health Check Configuration
{
"ServiceProviders": {
"Storage": {
"Azure": {
"Default": {
"ConnectionString": "your-connection-string",
"HealthOptions": {
"ContainerName": "health-check-container",
"BlobName": "health-check.txt",
"Content": "health check content"
}
}
}
}
}
}
Contribution Guidelines
Be conservative with new abstractions
The API surface must remain stable and meaningful.Limit dependency expansion
Only add foundational, version-stable dependencies.Favor additive, non-breaking changes
Breaking changes ripple through the entire ecosystem.Include thorough unit tests
All primitives and patterns should be independently testable.Document architectural decisions
Context and reasoning should be clear for future maintainers.Follow .NET conventions
Use established patterns from Microsoft.Extensions.* libraries.
Versioning
{REPO-NAME} follows Semantic Versioning:
- Major - Breaking API changes
- Minor - New features, backward compatible
- Patch - Bug fixes, backward compatible
Given its foundational role, major version bumps are rare and carefully considered.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Cirreum Foundation Framework
Layered simplicity for modern .NET
| 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.Identity (>= 1.18.0)
- Azure.Storage.Blobs (>= 12.27.0)
- Cirreum.ServiceProvider (>= 1.0.8)
- Cirreum.Storage (>= 1.0.104)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Cirreum.Storage.Azure:
| Package | Downloads |
|---|---|
|
Cirreum.Runtime.Storage
The Runtime Storage service configuration. |
GitHub repositories
This package is not used by any popular GitHub repositories.