VOOZH about

URL: https://www.nuget.org/packages/CasCap.Api.Azure.Storage/

⇱ NuGet Gallery | CasCap.Api.Azure.Storage 1.5.0




👁 Image
CasCap.Api.Azure.Storage 1.5.0

Prefix Reserved
dotnet add package CasCap.Api.Azure.Storage --version 1.5.0
 
 
NuGet\Install-Package CasCap.Api.Azure.Storage -Version 1.5.0
 
 
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.5.0" />
 
 
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.5.0" />
 
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.5.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CasCap.Api.Azure.Storage, 1.5.0"
 
 
#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.5.0
 
 
#: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.5.0
 
Install as a Cake Addin
#tool nuget:?package=CasCap.Api.Azure.Storage&version=1.5.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

CasCap.Api.Azure.Storage

Helper library for Azure Storage Services. Provides abstract base service classes for Blob, Queue, and Table storage operations with both connection string and TokenCredential authentication.

Installation

dotnet add package CasCap.Api.Azure.Storage

Services / Extensions

Type Name Description
Interface Contract for Azure Blob Storage container operations (upload, download, list, delete).
Interface Contract for Azure Queue Storage operations (enqueue, dequeue).
Interface Contract for Azure Table Storage CRUD operations with batch support.
Service Abstract base implementing IAzBlobStorageBase. Supports block blobs and append blobs.
Service Abstract base implementing IAzQueueStorageBase. Handles Base64 message encoding and JSON serialization.
Service Abstract base implementing IAzTableStorageBase. Supports batch upsert, delete, and query with parallel partition processing.
Extension Extension methods for Table Storage key validation (IsKeyValid), TableServiceClient.ExistsAsync, and date-from-filename parsing.
Message Event args for BatchCompletedEvent, carrying batch metadata (table name, partition key, count, remaining).

Key Methods —

  • CreateContainerIfNotExists(CancellationToken) — Creates the blob container if it does not exist.
  • DownloadBlobAsync(string blobName, CancellationToken) — Downloads blob content as a byte array.
  • ListContainerBlobs(string? prefix, CancellationToken) — Lists blobs in the container.
  • GetBlobPrefixes(string? prefix, CancellationToken) — Retrieves virtual directory prefixes.
  • DeleteBlob(string blobName, CancellationToken) — Deletes a blob.
  • UploadBlob(string blobName, byte[] | Stream, CancellationToken) — Uploads blob content.

Key Methods —

  • Enqueue<T>(T obj) / Enqueue<T>(List<T> objs) — Serializes and enqueues messages.
  • DequeueSingle<T>() — Dequeues and deserializes a single message.
  • DequeueMany<T>(int limit) — Dequeues and deserializes multiple messages.

Key Methods —

  • GetTables(CancellationToken) — Lists all tables in the storage account.
  • GetTableClient(string tableName, bool CreateIfNotExists, CancellationToken) — Gets a TableClient for a table.
  • UploadData<T>(TableClient, List<T>, bool useParallelism, CancellationToken) — Batch upsert entities (thread-safe via ConcurrentBag<T>).
  • UpsertEntity<T>(string tableName, T entity, CancellationToken) — Upserts a single entity.
  • DeleteData<T>(TableClient, List<T>, CancellationToken) — Batch delete entities.
  • GetEntities<T>(TableClient, ...) — Queries entities with optional filtering and paging.

Class Hierarchy

Abstract base classes for Azure Storage services:

classDiagram
 direction TB

 IAzBlobStorageBase <|.. AzBlobStorageBase
 IAzQueueStorageBase <|.. AzQueueStorageBase
 IAzTableStorageBase <|.. AzTableStorageBase

 AzBlobStorageBase <|-- YourBlobService
 AzQueueStorageBase <|-- YourQueueService
 AzTableStorageBase <|-- YourTableService

 class IAzBlobStorageBase {
 <<interface>>
 +CreateContainerIfNotExists() Task
 +DownloadBlobAsync(name) Task~byte[]~
 +ListContainerBlobs(prefix) IAsyncEnumerable~BlobItem~
 +DeleteBlob(name) Task
 }

 class AzBlobStorageBase {
 <<abstract>>
 #BlobContainerClient _containerClient
 #ILogger Logger
 +CreateContainerIfNotExists() Task
 +DownloadBlobAsync(name) Task~byte[]~
 +UploadBlob(name, data) Task
 +ListContainerBlobs(prefix) Task~List~BlobItem~~
 +GetBlobPrefixes(prefix) Task~List~string~~
 }

 class IAzQueueStorageBase {
 <<interface>>
 +Enqueue~T~(obj) Task
 +DequeueSingle~T~() Task~T~
 +DequeueMany~T~(limit) Task~List~T~~
 }

 class AzQueueStorageBase {
 <<abstract>>
 #QueueClient _queueClient
 #ILogger Logger
 +Enqueue~T~(obj) Task~bool~
 +Enqueue~T~(objs) Task~bool~
 +DequeueSingle~T~() Task~T~
 +DequeueMany~T~(limit) Task~List~T~~
 }

 class IAzTableStorageBase {
 <<interface>>
 +GetTables() AsyncPageable~TableItem~
 +UpsertEntity~T~(table, entity) Task
 +GetEntities~T~(table) AsyncPageable~T~
 }

 class AzTableStorageBase {
 <<abstract>>
 #TableServiceClient _tableSvcClient
 #ILogger Logger
 +event BatchCompletedEvent
 +GetTables() AsyncPageable~TableItem~
 +UploadData~T~(client, entities, parallel) Task
 +UpsertEntity~T~(table, entity) Task
 +DeleteData~T~(client, entities) Task
 +GetEntities~T~(client, filter) Task~List~T~~
 }

 class YourBlobService {
 +UploadImage(bytes) Task
 +GetImage(id) Task~byte[]~
 }

 class YourQueueService {
 +EnqueueMessage(msg) Task
 +ProcessMessages() Task
 }

 class YourTableService {
 +SaveEntity(entity) Task
 +QueryEntities(filter) Task~List~
 }

 AzBlobStorageBase ..> BlobContainerClient : uses
 AzQueueStorageBase ..> QueueClient : uses
 AzTableStorageBase ..> TableServiceClient : uses

Usage Pattern:

  1. Inherit from the appropriate abstract base class
  2. Pass connection string or TokenCredential (and optional ServiceVersion) to base constructor
  3. Use protected client and logger fields
  4. Call base methods or add domain-specific operations

Configuration

No IAppConfig model — services are constructed directly via their base class constructors.

All three base classes accept an optional ServiceVersion? parameter to pin the Azure Storage API version (useful for compatibility with Azurite or older service endpoints):

// Pin to a specific Blob API version (e.g. for Azurite compatibility)
public class MyBlobService(string connectionString, string containerName)
 : AzBlobStorageBase(connectionString, containerName, BlobClientOptions.ServiceVersion.V2024_11_04)
{
}

// Use SDK-default (latest) version — omit or pass null
public class MyTableService(string connectionString)
 : AzTableStorageBase(connectionString)
{
}

When null (the default), each SDK uses its built-in latest ServiceVersion.

Dependencies

NuGet Packages

Package
Azure.Core
Azure.Storage.Blobs
Azure.Storage.Queues
Azure.Data.Tables
System.Linq.Async
CasCap.Common.Logging
CasCap.Common.Extensions
CasCap.Common.Serialization.Json

Project References

None.

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

Pluggable event sink implementations (Redis, Azure Tables) for the CasCap.Api.Knx building automation 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.DoorBird.Sinks

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

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.5.0 230 6/12/2026
1.4.13 182 6/10/2026
1.4.12 206 5/27/2026
1.4.11 178 5/26/2026
1.4.10 139 5/21/2026
1.4.9 108 5/20/2026
1.4.8 352 5/13/2026
1.4.7 265 5/8/2026
1.4.6 103 5/4/2026
1.4.5 111 5/4/2026
1.4.4 298 4/23/2026
1.4.3 161 4/17/2026
1.4.2 118 4/16/2026
1.4.1 136 4/15/2026
1.4.0 232 4/1/2026
1.3.1 225 3/13/2026
1.3.0 117 3/11/2026
1.2.5 284 2/12/2026
1.2.4 121 2/2/2026
1.2.3 195 1/26/2026
Loading failed