示例#1
0
 public StateSpecifier OnEntryFrom <TArg0>(ParameterizedTrigger <TArg0> trigger,
                                           Action <TArg0, StateTransition> entryAction)
 {
     _specification.AddEntryAction(trigger.Trigger, (t, args) => entryAction(
                                       ParameterPackager.Unpack <TArg0>(args, 0), t));
     return(this);
 }
示例#2
0
 public StateSpecifier PermitIf <TArg0>(ParameterizedTrigger <TArg0> trigger,
                                        Func <TArg0, TStateType> destinationStateSelector, Func <bool> guard)
 {
     return(PermitIfInternal(
                trigger.Trigger,
                args => destinationStateSelector(
                    ParameterPackager.Unpack <TArg0>(args, 0)),
                guard));
 }