Ferrous.States
3.1.0
dotnet add package Ferrous.States --version 3.1.0
NuGet\Install-Package Ferrous.States -Version 3.1.0
<PackageReference Include="Ferrous.States" Version="3.1.0" />
<PackageVersion Include="Ferrous.States" Version="3.1.0" />
<PackageReference Include="Ferrous.States" />
paket add Ferrous.States --version 3.1.0
#r "nuget: Ferrous.States, 3.1.0"
#:package Ferrous.States@3.1.0
#addin nuget:?package=Ferrous.States&version=3.1.0
#tool nuget:?package=Ferrous.States&version=3.1.0
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.westness.cc for full documentation.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Ferrous.Core (>= 3.1.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Ferrous.States:
| Package | Downloads |
|---|---|
|
Ferrous
Rust-grade compile-time safety, zero-allocation primitives, source generators, and Clippy-style Roslyn analyzers for .NET (polyfilling on .NET 10 and lighting up natively on .NET 11 / C# 15). |
|
|
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 |
|---|---|---|
| 3.1.0 | 0 | 12/1/2026 |
| 3.0.1 | 0 | 12/1/2026 |
| 3.0.0 | 0 | 11/30/2026 |
| 2.8.1 | 0 | 11/30/2026 |
| 2.8.0 | 0 | 11/30/2026 |
| 2.7.0 | 0 | 11/30/2026 |
| 2.6.0 | 0 | 11/30/2026 |
| 2.4.2 | 0 | 11/30/2026 |
| 2.4.1 | 0 | 11/30/2026 |
| 2.4.0 | 0 | 11/30/2026 |
| 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 |