CasCap.Api.Azure.Storage 1.4.3

Prefix Reserved
dotnet add package CasCap.Api.Azure.Storage --version 1.4.3
                    
NuGet\Install-Package CasCap.Api.Azure.Storage -Version 1.4.3
                    
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.4.3" />
                    
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.4.3" />
                    
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.4.3
                    
#r "nuget: CasCap.Api.Azure.Storage, 1.4.3"
                    
#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.4.3
                    
#: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.4.3
                    
Install as a Cake Addin
#tool nuget:?package=CasCap.Api.Azure.Storage&version=1.4.3
                    
Install as a Cake Tool

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.

Services / Extensions

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

Key Methods — AzBlobStorageBase

  • 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.
  • PageBlobTest(string path, CancellationToken) — Page blob creation and write test.

Key Methods — AzQueueStorageBase

  • 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 — AzTableStorageBase

  • 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.
  • 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>>
        #BlobServiceClient Client
        #ILogger Logger
        +CreateContainerIfNotExists() Task
        +DownloadBlobAsync(name) Task~byte[]~
        +UploadBlob(name, data) Task
        +PageBlobTest(path) Task
    }

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

    class AzQueueStorageBase {
        <<abstract>>
        #QueueServiceClient Client
        #ILogger Logger
        +Enqueue~T~(obj) Task
        +Enqueue~T~(objs) Task
        +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 Client
        #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) AsyncPageable~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 ..> BlobServiceClient : uses
    AzQueueStorageBase ..> QueueServiceClient : uses
    AzTableStorageBase ..> TableServiceClient : uses

Usage Pattern:

  1. Inherit from appropriate abstract base class
  2. Pass connection string or TokenCredential to base constructor
  3. Use protected Client and Logger fields
  4. Call base methods or add domain-specific operations

Configuration

No configuration model. Services are constructed directly with connection strings or TokenCredential.

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 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

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.4.3 51 4/17/2026
1.4.2 76 4/16/2026
1.4.1 104 4/15/2026
1.4.0 211 4/1/2026
1.3.1 208 3/13/2026
1.3.0 97 3/11/2026
1.2.5 268 2/12/2026
1.2.4 102 2/2/2026
1.2.3 163 1/26/2026
1.2.2 446 12/11/2025
1.2.1 352 11/12/2025
1.1.16 231 10/19/2025
1.1.15 367 10/7/2025
1.1.14 284 9/30/2025
1.1.13 178 9/14/2025
1.1.12 361 8/7/2025
1.1.11 267 7/11/2025
1.1.10 299 4/18/2025
1.1.9 553 1/16/2025
1.1.8 451 1/15/2025
Loading failed