示例#1
0
 public AwaitableStateConfiguration <TState, TTrigger> Permit <TArgument>(
     ParameterizedTrigger <TTrigger, TArgument> trigger, TState resultingState,
     Func <Transition <TState, TTrigger>, TArgument, Task> onTriggerAction)
 {
     return(Helper.Permit(this, null, trigger.Trigger,
                          resultingState, onTriggerAction, AwaitableTransitionFlag.TriggerActionReturnsTask));
 }
示例#2
0
 public AwaitableStateConfiguration <TState, TTrigger> PermitIf(Func <Task <bool> > predicate, TTrigger trigger,
                                                                TState resultingState, Func <Transition <TState, TTrigger>, Task> onTriggerAction)
 {
     return(Helper.Permit(this, predicate, trigger, resultingState,
                          onTriggerAction,
                          AwaitableTransitionFlag.TriggerPredicateReturnsTask | AwaitableTransitionFlag.TriggerActionReturnsTask));
 }
示例#3
0
 public AwaitableStateConfiguration <TState, TTrigger> PermitIf <TArgument>(Func <Task <bool> > predicate,
                                                                            ParameterizedTrigger <TTrigger, TArgument> trigger,
                                                                            TState resultingState, Action <Transition <TState, TTrigger>, TArgument> onTriggerAction)
 {
     return(Helper.Permit(this, predicate, trigger.Trigger,
                          resultingState, onTriggerAction, AwaitableTransitionFlag.TriggerPredicateReturnsTask));
 }
示例#4
0
 public AwaitableStateConfiguration <TState, TTrigger> PermitReentryIf(Func <Task <bool> > predicate,
                                                                       TTrigger trigger, Action <Transition <TState, TTrigger> > onTriggerAction)
 {
     return(Helper.Permit(this, predicate, trigger,
                          CurrentStateRepresentation.State,
                          onTriggerAction, AwaitableTransitionFlag.TriggerPredicateReturnsTask));
 }
示例#5
0
 public AwaitableStateConfiguration <TState, TTrigger> PermitReentryIf <TArgument>(Func <bool> predicate,
                                                                                   ParameterizedTrigger <TTrigger, TArgument> trigger,
                                                                                   Action <Transition <TState, TTrigger>, TArgument> onTriggerAction)
 {
     return(Helper.Permit(this, predicate, trigger.Trigger,
                          CurrentStateRepresentation.State, onTriggerAction, AwaitableTransitionFlag.None));
 }
示例#6
0
 public AwaitableStateConfiguration <TState, TTrigger> PermitReentry(TTrigger trigger,
                                                                     Func <Transition <TState, TTrigger>, Task> onTriggerAction)
 {
     return(Helper.Permit(this, null, trigger,
                          CurrentStateRepresentation.State,
                          onTriggerAction, AwaitableTransitionFlag.TriggerActionReturnsTask));
 }
示例#7
0
 public AwaitableStateConfiguration <TState, TTrigger> PermitReentry <TArgument>(
     ParameterizedTrigger <TTrigger, TArgument> trigger,
     Func <Transition <TState, TTrigger>, TArgument, Task> onTriggerAction)
 {
     return(Helper.Permit(this, null, trigger.Trigger,
                          CurrentStateRepresentation.State,
                          onTriggerAction, AwaitableTransitionFlag.TriggerActionReturnsTask));
 }
示例#8
0
 public AwaitableStateConfiguration <TState, TTrigger> PermitReentry(TTrigger trigger)
 {
     return(Helper.Permit(this, null, trigger,
                          CurrentStateRepresentation.State, null, AwaitableTransitionFlag.None));
 }
示例#9
0
 public AwaitableStateConfiguration <TState, TTrigger> Permit(TTrigger trigger, TState resultingState,
                                                              Func <Transition <TState, TTrigger>, Task> onTriggerAction)
 {
     return(Helper.Permit(this, null, trigger,
                          resultingState, onTriggerAction, AwaitableTransitionFlag.TriggerActionReturnsTask));
 }
示例#10
0
 public AwaitableStateConfiguration <TState, TTrigger> Permit(TTrigger trigger, TState resultingState,
                                                              Action <Transition <TState, TTrigger> > onTriggerAction)
 {
     return(Helper.Permit(this, null, trigger, resultingState,
                          onTriggerAction, AwaitableTransitionFlag.None));
 }
示例#11
0
 public AwaitableStateConfiguration <TState, TTrigger> PermitIf(Func <bool> predicate, TTrigger trigger,
                                                                TState resultingState)
 {
     return(Helper.Permit(this, predicate, trigger, resultingState,
                          null, AwaitableTransitionFlag.None));
 }