Ferrous.States 2.3.0

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

Ferrous.States

Roslyn diagnostic analyzer enforcing linear typestate protocols declared with [Typestate] and [ConsumesSelf], pairing directly with Ferrous.Ownership:

  • FE0300 (Error): Direct construction of a non-initial [Typestate] outside a [ConsumesSelf] transition.
  • FE0301 (Warning): Transition method between [Typestate] types missing [ConsumesSelf].
  • FE0302 (Warning): Discarded result of a [ConsumesSelf] typestate transition.

Installation

dotnet add package Ferrous.States

Quick Example

using Ferrous;

[Typestate(IsInitial = true)]
public sealed class Draft
{
    [ConsumesSelf]
    public Published Publish() => new Published();
}

[Typestate]
public sealed class Published { }

See the Typestate Protocol Guide and Ferrous Repository for full documentation.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Ferrous.States:

Package Downloads
Ferrous

Metapackage bundling all Ferrous runtime libraries, source generators, and Roslyn analyzers.

Ferrous.CodeFixes

Roslyn IDE code fix providers for Ferrous diagnostics (FE0001, FE0301, FE0400, FE0401, FE0403).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.3.0 0 11/30/2026
2.2.0 0 11/30/2026
2.1.0 0 11/30/2026
2.0.0 0 11/30/2026
1.7.4 0 11/30/2026
1.7.3 0 11/30/2026
1.7.2 0 11/30/2026
1.7.1 0 11/30/2026
1.7.0 0 11/30/2026
1.6.0 0 11/30/2026
1.5.0 0 11/30/2026
1.4.0 32 11/30/2026
1.3.3 39 11/30/2026
1.3.2 40 11/30/2026
1.3.1 37 11/30/2026
1.3.0 40 11/30/2026
1.2.0 50 11/30/2026