Skip to content

Instantly share code, notes, and snippets.

@odeheurles
Created June 21, 2014 07:51
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/2a0ef6112f33d9f2425d to your computer and use it in GitHub Desktop.
Save odeheurles/2a0ef6112f33d9f2425d to your computer and use it in GitHub Desktop.
Defining RFQ Transitions
_stateMachine.Configure(RfqState.Input)
.Permit(RfqEvent.UserRequests, RfqState.Requesting);
_stateMachine.Configure(RfqState.Requesting)
.Permit(RfqEvent.ServerNewQuote, RfqState.Quoted)
.Permit(RfqEvent.UserCancels, RfqState.Cancelling)
.Permit(RfqEvent.InternalError, RfqState.Error);
_stateMachine.Configure(RfqState.Quoted)
.PermitReentry(RfqEvent.ServerNewQuote)
.Permit(RfqEvent.UserCancels, RfqState.Cancelling)
.Permit(RfqEvent.UserExecutes, RfqState.Executing);
_stateMachine.Configure(RfqState.Executing)
.Permit(RfqEvent.ServerSendsExecutionReport, RfqState.Done);
_stateMachine.Configure(RfqState.Cancelling)
.Permit(RfqEvent.ServerCancelled, RfqState.Cancelled);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment