Skip to content

Instantly share code, notes, and snippets.

@odeheurles
Created June 25, 2014 10:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save odeheurles/fce8fdb029501f754df4 to your computer and use it in GitHub Desktop.
Save odeheurles/fce8fdb029501f754df4 to your computer and use it in GitHub Desktop.
Defining actions
_stateMachine.Configure(RfqState.Requesting)
.OnEntry(LogTransition)
.OnEntryFrom(_rfqEventUserRequests, OnEntryRequesting)
.Permit(RfqEvent.ServerNewQuote, RfqState.Quoted)
.Permit(RfqEvent.UserCancels, RfqState.Cancelling)
.Permit(RfqEvent.InternalError, RfqState.Error);
private void OnEntryRequesting(IQuoteRequest quoteRequest)
{
// here goes the code to send a quote request to the server
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment