ViShap.Rewind.Generator 1.0.0-rc.3

Prefix Reserved
This is a prerelease version of ViShap.Rewind.Generator.
There is a newer version of this package available.
See the version list below for details.
dotnet add package ViShap.Rewind.Generator --version 1.0.0-rc.3
                    
NuGet\Install-Package ViShap.Rewind.Generator -Version 1.0.0-rc.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="ViShap.Rewind.Generator" Version="1.0.0-rc.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ViShap.Rewind.Generator" Version="1.0.0-rc.3" />
                    
Directory.Packages.props
<PackageReference Include="ViShap.Rewind.Generator" />
                    
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 ViShap.Rewind.Generator --version 1.0.0-rc.3
                    
#r "nuget: ViShap.Rewind.Generator, 1.0.0-rc.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 ViShap.Rewind.Generator@1.0.0-rc.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=ViShap.Rewind.Generator&version=1.0.0-rc.3&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=ViShap.Rewind.Generator&version=1.0.0-rc.3&prerelease
                    
Install as a Cake Tool

ViShap.Rewind.Generator

The source generator and analyzers of ViShap.Rewind. They run in the compiler only; no shipped assembly references this package. It comes with the meta-package ViShap.Rewind, which is the package to install.

The generator writes the tracked implementation of the partial properties of a class marked [Rewindable], so a domain type keeps ordinary property syntax and still has its changes undone on rollback:

using ViShap.Rewind;

var order = new Order();

using (Rewind.Begin())
{
    order.Total = 30m;
}

Console.WriteLine(order.Total); // 0

[Rewindable]
public partial class Order
{
    public partial decimal Total { get; set; }
}

Diagnostics

Id Severity Meaning
RWD0001 Error a [Rewindable] class, or a type it is nested in, is not partial
RWD0002 Warning a writable auto-property is not partial: a rollback does not restore it
RWD0003 Error a partial property has an init accessor or returns by reference
RWD0004 Warning a partial property has a mutable reference type: only the reference is tracked
RWD0005 Error a partial property is static, an indexer, or has no set accessor
RWD0006 Warning a [Rewindable] class implements INotifyPropertyChanged but has nothing generated code can call to raise it
RWD1001 Warning the scope returned by Rewind.Begin() is never disposed
RWD1002 Warning a call that changes something outside the process is made directly inside a scope
RWD1003 Error an asynchronous block is passed to Rewind.Run, AfterCommit, AfterRollback or Effect, which run it synchronously
RWD1004 Warning a RewindCell<T> holds a mutable reference type: only the reference is tracked
RWD1005 Warning a field of a [Rewindable] type is written inside a scope, and a rollback does not restore it
RWD1006 Warning parallel branches are started inside an asynchronous scope

Each is explained, with its fix, in the diagnostics documentation.

More in the documentation.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ViShap.Rewind.Generator:

Package Downloads
ViShap.Rewind

Atomic in-memory state change for .NET: a block of code either keeps all its changes or none, with effects bound to commit and rollback. Brings ViShap.Rewind.Core and its source generator.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 110 11/17/2026
1.0.0-rc.3 66 11/14/2026
1.0.0-rc.2 80 11/14/2026
1.0.0-rc.1 62 11/12/2026
1.0.0-beta.1 58 11/12/2026
1.0.0-alpha.1 62 11/11/2026