Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
new FSMDefinition<State>().CompletesWith<Completed>().
InState(State.Initial).With((state, x) => {
//dosomething
return State.Middle;
}).
InState(State.Middle).With((state, x) => {
//do something else
Send(new NextMessage(...));
return State.Ending;
}).
InState(State.Ending).With((state, x) => {
//ending
Send(new Completed(...));
return State.Completed;
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.