![]() |
VOOZH | about |
dotnet add package Stateless --version 5.20.1
NuGet\Install-Package Stateless -Version 5.20.1
<PackageReference Include="Stateless" Version="5.20.1" />
<PackageVersion Include="Stateless" Version="5.20.1" />Directory.Packages.props
<PackageReference Include="Stateless" />Project file
paket add Stateless --version 5.20.1
#r "nuget: Stateless, 5.20.1"
#:package Stateless@5.20.1
#addin nuget:?package=Stateless&version=5.20.1Install as a Cake Addin
#tool nuget:?package=Stateless&version=5.20.1Install as a Cake Tool
Create state machines and lightweight state machine-based workflows directly in .NET code:
var phoneCall = new StateMachine<State, Trigger>(State.OffHook);
phoneCall.Configure(State.OffHook)
.Permit(Trigger.CallDialled, State.Ringing);
phoneCall.Configure(State.Connected)
.OnEntry(t => StartCallTimer())
.OnExit(t => StopCallTimer())
.InternalTransition(Trigger.MuteMicrophone, t => OnMute())
.InternalTransition(Trigger.UnmuteMicrophone, t => OnUnmute())
.InternalTransition<int>(_setVolumeTrigger, (volume, t) => OnSetVolume(volume))
.Permit(Trigger.LeftMessage, State.OffHook)
.Permit(Trigger.PlacedOnHold, State.OnHold);
// ...
phoneCall.Fire(Trigger.CallDialled);
Assert.AreEqual(State.Ringing, phoneCall.State);
This project, as well as the example above, was inspired by Simple State Machine (Archived).
Most standard state machine constructs are supported:
Some useful extensions are also provided:
For guidance on how to use Stateles, the project README file contains documentation and code examples. The source repository also includes a few example projects.
We welcome contributions to this project. Check CONTRIBUTING.md for more info.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 is compatible. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on Stateless:
| Package | Downloads |
|---|---|
|
LittleForker
A utility to assist with spawning child processes, monitor their lifecycle and co-operative shutdown. |
|
|
DiegoRangel.DotNet.Framework.CQRS.Domain.Core
A common library for implementing CQRS based Domain layer. |
|
|
Delfin.Core.Application
A robust Application Layer library designed to facilitate the implementation of business logic and application services in .NET applications. This package provides essential abstractions, command and query handling, and integration with domain models, ensuring a clean architecture and separation of concerns. |
|
|
Hyperledger.Aries
.NET Core tools for building agent services |
|
|
WalletFramework
.NET Core tools for building agent services |
Showing the top 16 popular GitHub repositories that depend on Stateless:
| Repository | Stars |
|---|---|
|
microsoft/ailab
Experience, Learn and Code the latest breakthrough innovations with Microsoft AI
|
|
|
github/VisualStudio
GitHub Extension for Visual Studio
|
|
|
sipsorcery-org/sipsorcery
A WebRTC, SIP and VoIP library for C# and .NET. Designed for real-time communications apps.
|
|
|
Azure/iotedge
The IoT Edge OSS project
|
|
|
elevenyellow/handcrafted-persona-engine
An AI-powered interactive avatar engine using Live2D, LLM, ASR, TTS, and RVC. Ideal for VTubing, streaming, and virtual assistant applications.
|
|
|
dotnetGame/MineCase
Minecraft server based on Orleans
|
|
|
pardahlman/RawRabbit
A modern .NET framework for communication over RabbitMq
|
|
|
NimbleSense/Susalem
加入带锅宫酱,来到苏州耶路撒冷的怀抱吧!
|
|
|
JasonBock/Rocks
A mocking library based on the Compiler APIs (Roslyn + Mocks)
|
|
|
CrossGeeks/xUber
Uber Clone using Xamarin Forms
|
|
|
DynamicTranslator/DynamicTranslator
Instant translation application for windows in .NET :circus_tent:
|
|
|
damianh/LittleForker
A .NET utility library to spawn, supervise and (optionally) cleanly shut down child processes.
|
|
|
ShenCiao/Ciallo
The next-generation vector paint program built with Godot C#.
|
|
|
mrsalmon1976/Stateless.WorkflowEngine
Basic .NET workflow engine based on the awesome stateless State Machine.
|
|
|
Kaioru/Edelstein
A v.95.1 Mushroom game server emulator written in C# .NET
|
|
|
Enzx/NxGraph
NxGraph is a zero-allocation runtime, high-performance finite state machine (FSM) framework for .NET 8+, designed for scenarios where execution speed, memory efficiency, and runtime safety are critical.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 5.20.1 | 643,154 | 2/9/2026 |
| 5.20.1-dev-23984902460 | 128 | 4/4/2026 |
| 5.20.1-dev-19407615528 | 7,014 | 11/16/2025 |
| 5.20.1-dev-19407520956 | 295 | 11/16/2025 |
| 5.20.0 | 837,028 | 9/18/2025 |
| 5.20.0-dev-17841589139 | 372 | 9/18/2025 |
| 5.19.0 | 166,706 | 8/22/2025 |
| 5.19.0-dev-17621326750 | 369 | 9/18/2025 |
| 5.19.0-dev-17157499513 | 207 | 8/22/2025 |
| 5.18.0 | 130,002 | 8/3/2025 |
| 5.18.0-dev-17151133875 | 224 | 8/22/2025 |
| 5.18.0-dev-17151048893 | 217 | 8/22/2025 |
| 5.18.0-dev-17123170070 | 243 | 8/21/2025 |
| 5.18.0-dev-16986834496 | 235 | 8/15/2025 |
| 5.18.0-dev-16665478063 | 195 | 8/1/2025 |
| 5.18.0-dev-16665368567 | 234 | 8/1/2025 |
| 5.17.0 | 3,013,178 | 12/30/2024 |
| 5.17.0-dev-16123181037 | 245 | 7/7/2025 |
| 5.17.0-dev-12573353197 | 275 | 1/1/2025 |
| 5.17.0-dev-12536414383 | 260 | 12/29/2024 |