UA.Azure.Storage 10.0.3

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

UA.Azure.Storage

NuGet Downloads

UA.Azure.Storage is the Azure Storage package in the UA Devs stack. It uses a lightweight, REST-first programming model built on UA.Tenet agents: you send request models to Blob, Queue, and Table agents, and you get back StorageResponse so you can inspect headers, payloads, and status codes directly.

Why this package exists

Use UA.Azure.Storage when you want:

  • one lightweight package for Blob, Queue, and Table storage operations
  • direct control over Azure Storage REST behavior without the full Azure SDK surface
  • stream-first blob upload and download flows
  • explicit metadata, request ID, lease, tag, and OData query control
  • an API style that fits naturally into Tenet services and agents

Package characteristics

  • Targets .NET 8, .NET 9, and .NET 10.
  • Depends on UA.Tenet and signs Azure Storage requests from a connection string.
  • Uses request models such as BlobRequest, ContainerRequest, QueueRequest, MessageRequest, TableRequest, and EntityRequest.
  • Returns StorageResponse, which exposes status code, headers, request metadata, and typed helpers such as ReadStream(), ReadString(), ReadJson<T>(), and ReadXml<T>().

Programming model

UA.Azure.Storage does not try to hide the transport. Each agent issues Azure Storage REST calls and returns a StorageResponse that you can inspect or deserialize as needed.

using UA.Azure.Storage.Blob;
using UA.Azure.Storage.Internals.Models;

BlobAgent blobs = new(connectionString, autoAssignRequestId: true);

using StorageResponse response = await blobs.GetBlob(("documents", "invoice.pdf"));

if (!response.IsSuccessStatusCode)
    throw new InvalidOperationException(await response.ReadString());

await using Stream payload = await response.ReadStream();

Useful shorthand conversions are built into the current request model set:

  • ContainerRequest, QueueRequest, and TableRequest can be created from strings
  • BlobRequest can be created from (containerName, blobName) tuples
  • MessageItem.DecodedText exposes queue message text after Base64 decoding

Current agent surface

Agent Best current operations Notes
BlobAgent Service properties and stats, preflight, container create or delete or existence checks, container ACL and metadata reads, container listing, blob put or get or delete, blob existence checks, blob listing, blob metadata updates, append, copy, abort copy, and find by tags Several advanced blob and container members are declared but currently throw NotImplementedException, including block and page helpers, snapshot or undelete flows, tag and property helpers, query contents, and container lease or property setters
QueueAgent Queue create or delete or list, ACL and metadata reads and writes, message create or delete or list or update, and account-level service calls Message bodies are Base64-encoded on send. Deserialize MessageList and read MessageItem.DecodedText on the way back
TableAgent Table create or delete or query, ACL reads and writes, entity create or update or delete or merge or upsert or query, and batch execution Batch() emits IAsyncEnumerable<StorageResponse> and processes work in chunks of 100 operations. SetServiceProperties(...) is declared but not yet implemented

Installation

dotnet add package UA.Azure.Storage

Quick start

Blob upload and download

using UA.Azure.Storage.Blob;
using UA.Azure.Storage.Blob.Models;
using UA.Azure.Storage.Internals.Models;

BlobAgent blobs = new(connectionString, autoAssignRequestId: true);

await blobs.CreateContainer("documents");

await using FileStream file = File.OpenRead("invoice.pdf");

using StorageResponse upload = await blobs.PutBlob(new BlobRequest
{
    Container = "documents",
    Name = "invoice.pdf",
    Content = file,
    MimeType = "application/pdf"
});

using StorageResponse download = await blobs.GetBlob(("documents", "invoice.pdf"));
await using Stream payload = await download.ReadStream();

Queue create, send, and peek

using UA.Azure.Storage.Internals.Models;
using UA.Azure.Storage.Queue;
using UA.Azure.Storage.Queue.Models;

QueueAgent queues = new(connectionString, autoAssignRequestId: true);

await queues.Create("processing-queue");

using StorageResponse send = await queues.Create(
    new MessageRequest("processing-queue"),
    new MessageItem { RawText = "Process order #12345" });

using StorageResponse peek = await queues.List(
    new MessageRequest("processing-queue"),
    maxResults: 5,
    isPeekOnly: true);

MessageList? messages = await peek.ReadXml<MessageList>();

foreach (MessageItem message in messages?.Items ?? [])
{
    Console.WriteLine(message.DecodedText);
}

Table upsert and query

using UA.Azure.Storage.Internals.Models;
using UA.Azure.Storage.Table;
using UA.Azure.Storage.Table.Models;
using UA.Tenet.Collections;

TableAgent tables = new(connectionString, autoAssignRequestId: true);

await tables.Create("Customers");

Any<object> customer = new()
{
    [TableAgent.PartitionKey] = "ES",
    [TableAgent.RowKey] = "customer-001",
    ["Name"] = "John Doe",
    ["Email"] = "john@example.com"
};

await tables.ReplaceUpsert(new EntityRequest("Customers", "ES", "customer-001"), customer);

ODataQuery query = new()
    .Select(["Name", "Email"])
    .And(TableAgent.PartitionKey, ODataOperator.Equal, "ES")
    .Top(100);

using StorageResponse response = await tables.Query(
    new EntityRequest("Customers"),
    query,
    includeMetadata: true);

string json = await response.ReadString();

Configuration and dependency injection

Using a connection string

string connectionString = configuration.GetConnectionString("AzureStorage")
    ?? throw new InvalidOperationException("Missing AzureStorage connection string.");

BlobAgent blobs = new(connectionString, autoAssignRequestId: true);

Registering agents in DI

builder.Services.AddSingleton(sp =>
    new BlobAgent(configuration.GetConnectionString("AzureStorage")!, autoAssignRequestId: true));

builder.Services.AddSingleton(sp =>
    new QueueAgent(configuration.GetConnectionString("AzureStorage")!, autoAssignRequestId: true));

builder.Services.AddSingleton(sp =>
    new TableAgent(configuration.GetConnectionString("AzureStorage")!, autoAssignRequestId: true));

Important notes

  • Agents derive their base URLs and request signing from the connection string, so AccountName and AccountKey must be present.
  • StorageResponse is IDisposable. Dispose it after consuming the content stream or body.
  • Queue messages are Base64-encoded on send. Use MessageItem.DecodedText after deserializing the response payload.
  • TableAgent.Batch() processes work in groups of 100 operations and yields one StorageResponse per submitted batch.
  • Several advanced blob and table members are already declared on the public surface but are not implemented yet. Check support before depending on placeholder operations.
  • This package is a lightweight REST wrapper, not a full replacement for the Azure SDK.

Documentation

For broader documentation and Azure protocol details, see:

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
10.0.3 90 4/1/2026
10.0.2 85 4/1/2026
10.0.1 80 3/31/2026
10.0.0 79 3/26/2026
4.11.3 84 3/25/2026
Loading failed