public static AwaitableStateConfiguration <TState, TTrigger> PermitDynamic <TState, TTrigger>(
            this AwaitableStateConfiguration <TState, TTrigger> config, TTrigger trigger,
            Func <Task <DynamicState <TState> > > targetStateFunc,
            Func <Task> onTriggerAction)
        {
            Contract.NotNull(onTriggerAction != null, nameof(onTriggerAction));

            return(config.PermitDynamic(trigger, targetStateFunc, t => onTriggerAction()));
        }
        public static AwaitableStateConfiguration <TState, TTrigger> PermitDynamic <TArgument, TState, TTrigger>(
            this AwaitableStateConfiguration <TState, TTrigger> config, ParameterizedTrigger <TTrigger, TArgument> trigger,
            Func <TArgument, DynamicState <TState> > targetStateFunc,
            Func <TArgument, Task> onTriggerAction)
        {
            Contract.NotNull(onTriggerAction != null, nameof(onTriggerAction));

            return(config.PermitDynamic(trigger, targetStateFunc, (t, a) => onTriggerAction(a)));
        }
Esempio n. 3
0
        public static AwaitableStateConfiguration <TState, TTrigger> PermitDynamic <TState, TTrigger>(
            this AwaitableStateConfiguration <TState, TTrigger> config, TTrigger trigger,
            Func <DynamicState <TState> > targetStateFunc,
            Action onTriggerAction)
        {
            Contract.Requires <ArgumentNullException>(onTriggerAction != null, nameof(onTriggerAction));

            return(config.PermitDynamic(trigger, targetStateFunc, t => onTriggerAction()));
        }