In-memory drop-in replacement for Azure.Storage.Blobs, Azure.Data.Tables, and Azure.Storage.Queues SDK clients. Thread-safe with ETag concurrency and deep-clone semantics.
Install
| Product | Versions |
|---|---|
| .NET Standard |
README
![]()
Iciclecreek.Azure.Storage.Memory
A thread-safe, in-memory drop-in replacement for Azure.Storage.Blobs, Azure.Data.Tables, and Azure.Storage.Queues clients. Use the same Azure SDK types in tests without any disk I/O, databases, or external services.
Objects returned from reads are deep-cloned to properly simulate network storage semantics — no shared references, no accidental cache hits.
Installation
dotnet add package Iciclecreek.Azure.Storage.Memory
Usage
Create a provider and account
using Iciclecreek.Azure.Storage.Memory;
using Iciclecreek.Azure.Storage.Memory.Blobs;
using Iciclecreek.Azure.Storage.Memory.Tables;
using Iciclecreek.Azure.Storage.Memory.Queues;
var provider = new MemoryStorageProvider();
var account = provider.AddAccount("devaccount");
Blobs
BlobContainerClient container = MemoryBlobContainerClient.FromAccount(account, "my-container");
await container.CreateIfNotExistsAsync();
BlobClient blob = container.GetBlobClient("hello.txt");
await blob.UploadAsync(BinaryData.FromString("Hello, World!"));
var result = (await blob.DownloadContentAsync()).Value;
Console.WriteLine(result.Content.ToString()); // "Hello, World!"
Tables
TableClient table = MemoryTableClient.FromAccount(account, "people");
await table.CreateIfNotExistsAsync();
await table.AddEntityAsync(new TableEntity("users", "alice") { ["Name"] = "Alice" });
var entity = (await table.GetEntityAsync<TableEntity>("users", "alice")).Value;
Queues
QueueClient queue = MemoryQueueClient.FromAccount(account, "tasks");
queue.Create();
queue.SendMessage("do the thing");
var msg = queue.ReceiveMessage().Value;
Console.WriteLine(msg.Body.ToString()); // "do the thing"
Swap in via dependency injection
Every Memory* client inherits from its Azure SDK base type:
// Production
services.AddSingleton<BlobContainerClient>(
new BlobContainerClient(connectionString, "images"));
// Test
var provider = new MemoryStorageProvider();
var account = provider.AddAccount("test");
services.AddSingleton<BlobContainerClient>(
MemoryBlobContainerClient.FromAccount(account, "images"));
Related Packages
| Package | Description |
|---|---|
| Iciclecreek.Azure.Storage.FileSystem | Filesystem-backed implementation (files on disk) |
| Iciclecreek.Azure.Storage.SQLite | SQLite-backed implementation (single .db file per account) |
| Iciclecreek.Azure.Storage.Server | ASP.NET Core REST API server on top of any provider |
License
MIT
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.