CanDoItAll.Ledger.Storage.InMemory 0.1.18

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

CanDoItAll.Ledger.Storage.InMemory

Thread-safe in-memory Ledger storage for tests and disposable single-process development.

The store implements ILedgerConfirmationStore and serializes confirmation inside one instance. Use it when a fast, isolated ledger is more important than durability or multi-process coordination.

Requirements

  • .NET 10

Install

dotnet add package CanDoItAll.Ledger.Storage.InMemory

Use Directly

using CanDoItAll.Ledger.Core;
using CanDoItAll.Ledger.Storage.InMemory;

ILedgerStore store = new InMemoryLedgerStore();

LedgerState? state = await store.GetLedgerStateAsync(
    new LedgerId("agent-expenses"),
    scenarioId: null,
    CancellationToken.None);

Register

using CanDoItAll.Ledger.Core;
using CanDoItAll.Ledger.Storage.InMemory;

builder.Services.AddSingleton<InMemoryLedgerStore>();
builder.Services.AddSingleton<ILedgerStore>(
    services => services.GetRequiredService<InMemoryLedgerStore>());
builder.Services.AddSingleton<ILedgerConfirmationStore>(
    services => services.GetRequiredService<InMemoryLedgerStore>());

Use a singleton when one process should share one disposable ledger. A scoped or transient registration creates separate stores and therefore separate ledger state.

Limitations

  • All data is lost when the owning process or service instance ends.
  • The store has no backup, restore, migration, or cross-process coordination path.
  • Its confirmation lock protects one store instance only.
  • It is appropriate for unit tests, examples, and disposable local tools, not authoritative agent or project expense records.
  • Use CanDoItAll.Ledger.Persistence.PostgreSql for a durable node.

See the Engine package, PostgreSQL provider, and full source.

This package is part of the CanDoItAll ecosystem and uses the repository's MIT License.

Product Compatible and additional computed target framework versions.
.NET 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 (1)

Showing the top 1 NuGet packages that depend on CanDoItAll.Ledger.Storage.InMemory:

Package Downloads
CanDoItAll.Ledger.Components

Reusable Blazor components and workspaces for ledger accounts, transactions, business objects, analytics, and node operations.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.18 0 7/31/2026
0.1.17 31 7/30/2026