Arlecchino.Atoms.History
2026.9.3
dotnet add package Arlecchino.Atoms.History --version 2026.9.3
NuGet\Install-Package Arlecchino.Atoms.History -Version 2026.9.3
<PackageReference Include="Arlecchino.Atoms.History" Version="2026.9.3" />
<PackageVersion Include="Arlecchino.Atoms.History" Version="2026.9.3" />
<PackageReference Include="Arlecchino.Atoms.History" />
paket add Arlecchino.Atoms.History --version 2026.9.3
#r "nuget: Arlecchino.Atoms.History, 2026.9.3"
#:package Arlecchino.Atoms.History@2026.9.3
#addin nuget:?package=Arlecchino.Atoms.History&version=2026.9.3
#tool nuget:?package=Arlecchino.Atoms.History&version=2026.9.3

Undo and redo for Arlecchino.Core atoms.
An atom in Arlecchino.Core holds a value, tells what reads it, and forgets what it held. The atoms here
are the same atoms with their changes written down, so an application can walk them back:
public sealed class SettingsStore : ArlecchinoAsyncStore
{
private const string HistoryKey = "Settings";
public HistoryAtom<string> Server { get; } = new("127.0.0.1", $"{HistoryKey}.Server");
public HistoryAtom<decimal> Port { get; } = new(40000, $"{HistoryKey}.Port");
public Atom<string> Filter { get; } = new(""); // not on the stack, and not meant to be
}
Turn it on where the container is built:
builder.Services.UseHistory(options => options.FileName = "session.undo");
AtomHistory collects the steps, one per application. Naming a file is what asks for one, and a file is
kept in order to be come back to: HistoryFile writes the steps beside the program, one step per line,
the file outlives the run, and the next one indexes it, adds to it, and starts every named atom holding
what it last saw that atom hold. Left unnamed, the history is kept in memory for as long as the process
runs.
Memory holds the last Capacity steps. Older ones live in the file and are seeked to one at a time when
an undo asks for them, so a long history costs an offset and a length per step rather than its values.
The second argument names the atom, and is how a step written by an earlier run finds its atom in this one. It is written in full rather than worked out from the code around it, so that renaming a class or a property does not quietly orphan a history that was kept.
A name stands for one piece of state: claiming it again with the same kind of atom takes the slot over, which is what a screen's store rebuilt on the way back relies on, while claiming it with another kind is refused.
Nothing here is needed to use atoms, and Arlecchino does not reference this package: without
UseHistory nothing records a step, and the atoms that could feed a history allocate nothing for one.
| Product | Versions 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 was computed. 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. |
-
net10.0
- Arlecchino.Core (>= 2026.9.3)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.11)
-
net8.0
- Arlecchino.Core (>= 2026.9.3)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.11)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Arlecchino.Atoms.History:
| Package | Downloads |
|---|---|
|
Arlecchino.Testing
Headless test host for Arlecchino applications: a fake terminal, key and mouse input, and frames captured as plain text. |
GitHub repositories
This package is not used by any popular GitHub repositories.
What changed in this version: https://github.com/The1fEst/Arlecchino/blob/master/CHANGELOG.md#202693