RoadieRichStateMachine 1.0.6
dotnet add package RoadieRichStateMachine --version 1.0.6
NuGet\Install-Package RoadieRichStateMachine -Version 1.0.6
<PackageReference Include="RoadieRichStateMachine" Version="1.0.6" />
<PackageVersion Include="RoadieRichStateMachine" Version="1.0.6" />
<PackageReference Include="RoadieRichStateMachine" />
paket add RoadieRichStateMachine --version 1.0.6
#r "nuget: RoadieRichStateMachine, 1.0.6"
#:package RoadieRichStateMachine@1.0.6
#addin nuget:?package=RoadieRichStateMachine&version=1.0.6
#tool nuget:?package=RoadieRichStateMachine&version=1.0.6
A simple state machine library. Can use states that are defined using delegates, or more powerful custom class states.
using (StateMachine funcSm = new()) { var initFuncState = new FunctionState((vars) ⇒ vars["x"] = 0); var funcState = new FunctionState((vars) ⇒ Console.Write($"{vars["x"]} ")); var incrementFuncState = new FunctionState((vars) ⇒ vars["x"] = vars["x"] + 1); var evenFuncState = new FunctionState((vars) ⇒ Console.WriteLine("is even")); var oddFuncState = new FunctionState((vars) ⇒ Console.WriteLine("is odd"));
initFuncState.AddTransitionTo(funcState, (vars) => true);
incrementFuncState.AddTransitionTo(StateMachine.ExitState, (vars) => vars["x"] > 10);
incrementFuncState.AddTransitionTo(funcState, (vars) => true);
funcState.AddTransitionTo(evenFuncState, (vars) => vars["x"] % 2 == 0);
funcState.AddTransitionTo(oddFuncState, (vars) => vars["x"] % 2 == 1);
evenFuncState.AddTransitionTo(incrementFuncState, (vars) => true);
oddFuncState.AddTransitionTo(incrementFuncState, (vars) => true);
funcSm.InitialState = initFuncState;
funcSm.Run();
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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 was computed. 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. |
-
net7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.