Created
January 20, 2019 19:33
-
-
Save gregoryyoung/e7ea27292b83f48109b6b29c78bcb6f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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