CasCap.Api.Azure.Storage 1.7.1

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

CasCap.Api.Azure.Storage

Abstract Azure Blob, Queue and Table Storage services for .NET applications. Derive a concrete service to reuse the corresponding IAzBlobStorageBase, IAzQueueStorageBase or IAzTableStorageBase implementation.

Installation

Targets net8.0, net9.0 and net10.0.

dotnet add package CasCap.Api.Azure.Storage

Usage

Supply a connection string from secret-backed application configuration:

using CasCap.Services;

public sealed class DocumentStorage(string connectionString)
    : AzBlobStorageBase(connectionString, "documents")
{
}
var storage = new DocumentStorage(connectionString);
await storage.UploadBlob("example.txt", "Hello"u8.ToArray(), cancellationToken);
byte[]? bytes = await storage.DownloadBlobAsync("example.txt", cancellationToken);

The blob constructor synchronously creates the container if it does not exist, so constructing or resolving the service performs network I/O and requires creation permission when the container is absent. Uploads overwrite existing block blobs. DownloadBlobAsync returns null for a missing blob.

Base service Selected operations Important behavior
AzBlobStorageBase UploadBlob, DownloadBlobAsync, ListContainerBlobs, GetBlobPrefixes, DeleteBlob Lists are materialized, not streamed; supports append-blob operations too
AzQueueStorageBase Enqueue<T>, DequeueSingle<T>, DequeueMany<T> JSON with Base64 queue encoding; creates the queue on first operation
AzTableStorageBase GetTables, GetTableClient, UpsertEntity, UploadData, DeleteData, GetEntities Batch operations and BatchCompletedEvent; queries return materialized collections
StorageExtensions IsKeyValid, table existence and date/key conversion helpers Utility extensions, not service registration

Queue Delivery Caution

Dequeue methods deserialize and delete messages before returning them, not after your application processes them. DequeueSingle<T> also deletes malformed JSON messages and returns a null object with the message metadata. Use the Azure SDK directly when you need explicit acknowledgement, poison-message handling or processing retries.

Enqueue(List<T>) returns true when at least one send succeeds; it is not an all-items-success guarantee. Deserialization failures can log payload content, so configure log destinations accordingly.

Authentication and Service Versions

All three base classes have connection-string and TokenCredential constructors. Token constructors take the appropriate service URI; Blob and Queue also take a container/queue name, which is appended to that URI. Table takes a table-service endpoint. Grant the caller the storage data-plane roles needed for its reads, writes and resource creation.

There is no options model or DI registration helper. Each base constructor accepts an optional SDK ServiceVersion?, useful when an emulator supports an older service API:

using Azure.Storage.Blobs;
using CasCap.Services;

public sealed class EmulatorDocuments(string connectionString)
    : AzBlobStorageBase(
        connectionString, "documents", BlobClientOptions.ServiceVersion.V2024_11_04)
{
}

Omitting the version uses that SDK's default; it does not negotiate emulator compatibility. Store connection strings outside tracked configuration.

Documentation

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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 (4)

Showing the top 4 NuGet packages that depend on CasCap.Api.Azure.Storage:

Package Downloads
CasCap.Api.DoorBird.Sinks

Pluggable event sink implementations (Redis, Azure Tables, Azure Blob Storage) for the CasCap.Api.DoorBird door station integration library.

CasCap.Api.Fronius.Sinks

Pluggable event sink implementations (Redis, Azure Tables) for the CasCap.Api.Fronius solar inverter integration library.

CasCap.Api.Buderus.Sinks

Pluggable event sink implementations (Redis, Azure Tables) for the CasCap.Api.Buderus heating integration library.

CasCap.Api.Knx.Sinks

Pluggable event sink implementations (Redis, Azure Tables) for the CasCap.Api.Knx building automation integration library.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.7.1 76 10/24/2026
1.7.0 116 10/21/2026
1.6.4 169 10/4/2026
1.6.3 188 9/25/2026
1.6.2 178 9/23/2026
1.6.1 137 9/21/2026
1.6.0 293 9/19/2026
1.5.5 244 9/11/2026
1.5.4 127 9/1/2026
1.5.3 207 8/18/2026
1.5.2 239 7/15/2026
1.5.1 247 6/26/2026
1.5.0 328 6/12/2026
1.4.13 230 6/10/2026
1.4.12 244 5/27/2026
1.4.11 218 5/26/2026
1.4.10 175 5/21/2026
1.4.9 158 5/20/2026
1.4.8 396 5/13/2026
1.4.7 302 5/8/2026
Loading failed