Skip to content

Stateman is simple state machine library for .NET languages.

License

Notifications You must be signed in to change notification settings

reifujimura/Stateman

Repository files navigation

Stateman

Build Status

Stateman is simple state machine library for .NET languages.

License

MIT License

Installation

dotnet add package Stateman

Usage

class FooState : State
{
}

class BarState : State
{
}
var stateMachine = new StateMachine(new FooState());
stateMachine.Transited += sender => {
    // Raised when state changed.
}

// Transition from FooState to BarState
stateMachine.Transit<FooState, BarState>();

// Transition to previous state.
stateMachine.Previous();

// Transition to next state.
stateMachine.Next();

About

Stateman is simple state machine library for .NET languages.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages