Exemple #1
0
 /// <summary>
 ///     Set condition for validation before transition to next state. This condition based on concrete input value.
 /// </summary>
 public static StateConfiguration <TState, TInput> ConditionFor <TState, TInput>(this StateConfiguration <TState, TInput> config, TInput input, Func <bool> conditionFor)
 {
     return(config.ConditionFor(input, (x, y) => Task.FromResult(conditionFor())));
 }
Exemple #2
0
 /// <summary>
 ///     Set condition for validation before transition to next state. This condition based on concrete input value.
 /// </summary>
 public static StateConfiguration <TState, TInput> ConditionFor <TState, TInput>(this StateConfiguration <TState, TInput> config, TInput input, Func <TState, Task <bool> > conditionFor, string messge)
 {
     return(config.ConditionFor(input, (x, y) => conditionFor(x), messge));
 }