예제 #1
0
 public static StateMachineBuilderContext <TState, TTrigger, StateMachineBuilderContext.WithTriggers> WithTrigger <TState, TTrigger, TPredicateArg0>(this StateMachineBuilderContext <TState, TTrigger, StateMachineBuilderContext.WithTriggers> that, TTrigger trigger, Func <TPredicateArg0, bool> predicate, TState targetState)
 {
     return(new StateMachineBuilderContext <TState, TTrigger, StateMachineBuilderContext.WithTriggers>(new StateDefinition <TState, TTrigger>(that.StateDefinition.State, that.StateDefinition.Triggers.Concat(new[] { new TriggerDefinition <TState, TTrigger, TPredicateArg0>(trigger, predicate, targetState) }))));
 }
예제 #2
0
 public static StateMachineBuilderContext <TState, TTrigger, StateMachineBuilderContext.WithState> DefineState <TState, TTrigger>(this StateMachineBuilderContext <TState, TTrigger, StateMachineBuilderContext.WithNothing> that, TState state)
 {
     return(new StateMachineBuilderContext <TState, TTrigger, StateMachineBuilderContext.WithState>(stateDefinition: new StateDefinition <TState, TTrigger>(state, null)));
 }