-
Notifications
You must be signed in to change notification settings - Fork 0
Packages
This library is split into a few packages so you can reference only what you need.
The core state machine implementation. Most consumers should reference this package otherwise what are you even doing here? 🤣
It includes a bundled source generator (FunctionalStateMachine.Core.Generator) that registers your trigger types at compile time. This enables unused-trigger analysis and makes the library fully compatible with NativeAOT and PublishTrimmed — no extra package reference needed.
Optional command runner integration that dispatches commands through DI. You can implement your own command dispatcher but it's very boilerplate-y.
Use it when you want:
- Command handlers as DI-resolved classes.
- A built-in provider to run commands returned by the state machine.
Note: It includes a source generator so the dispatcher does not use reflection.
Design-time diagram generator for Mermaid diagrams.
Use it when you want:
- Build-time diagrams from your builder methods.
- No runtime dependency (analyzer-only package).
Add a package reference and annotate builder methods with [StateMachineDiagram("path/to/diagram.md")].
- Always:
FunctionalStateMachine.Core - Optional:
FunctionalStateMachine.CommandRunnerfor DI-based command execution. - Optional:
FunctionalStateMachine.Diagramsfor build-time Mermaid diagrams.