Skip to content

bubdm/SimpleStateMachineLibrary

Repository files navigation

SimpleStateMachineLibrary NuGet Downloads NuGet Pre Release

A C# library for realization simple state-machine on .Net

Create state machine in three steps :

1. Create scheme in node editor and load scheme in your project using library

StateMachine stateMachine = new StateMachine("scheme.xml");

2. Describe your app logic on events

stateMachine.GetState("State1").OnExit(Action1);
stateMachine.GetState("State2").OnEntry(Action2);
stateMachine.GetTransition("Transition1").OnInvoke(Action3);
stateMachine.OnChangeState(Action4);

3. Run the state machine

stateMachine.Start(parametersForStart);

Give a Star! ⭐

If you like or are using this project please give it a star. Thanks!

Features

State machine properties:

  • Start state
  • Entry/exit events for state
  • Invoke event for transition
  • Parameters for transitions
  • Parameters for entry/exit for state

Useful extensions for work:

  • State changed event for state machine
  • Data for sharing between states
  • Change event for data
  • Export/Import to/from XML
  • Logging

Documentation

Documentation here: https://github.com/SimpleStateMachine/SimpleStateMachineLibrary/wiki

License

Copyright (c) SimpleStateMachine

Licensed under the MIT license.

About

📚 A simple library for realization state machines in C# code

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages

  • C# 100.0%