public static FluentBuilder <TContext> LimitCallRate <TContext>(
     this FluentBuilder <TContext> builder,
     string name,
     int intervalInMilliseconds) where TContext : IClock
 {
     return(builder.PushComposite(children => new RateLimiter <TContext>(name, children[0], intervalInMilliseconds)));
 }
 public static FluentBuilder <TContext> RandomSelector <TContext>(
     this FluentBuilder <TContext> builder,
     string name,
     IRandomProvider randomProvider = null)
 {
     return(builder.PushComposite(children => new RandomSelector <TContext>(name, children, randomProvider)));
 }
 public static FluentBuilder <TContext> SimpleParallel <TContext>(
     this FluentBuilder <TContext> builder,
     string name,
     SimpleParallelPolicy policy = SimpleParallelPolicy.BothMustSucceed)
 {
     return(builder.PushComposite(children => new SimpleParallel <TContext>(name, policy, children[0], children[1])));
 }
 public static FluentBuilder <TContext> Wait <TContext>(
     this FluentBuilder <TContext> builder,
     string name,
     int waitTimeInMilliseconds) where TContext : IClock
 {
     return(builder.PushLeaf(() => new Wait <TContext>(name, waitTimeInMilliseconds)));
 }
 public static FluentBuilder <TContext> Condition <TContext>(
     this FluentBuilder <TContext> builder,
     string name,
     Func <TContext, bool> condition)
 {
     return(builder.PushLeaf(() => new Condition <TContext>(name, condition)));
 }
 public static FluentBuilder <TContext> Do <TContext>(
     this FluentBuilder <TContext> builder,
     string name,
     Func <TContext, BehaviourStatus> action)
 {
     return(builder.PushLeaf(() => new ActionBehaviour <TContext>(name, action)));
 }
 public static FluentBuilder <TContext> TimeLimit <TContext>(
     this FluentBuilder <TContext> builder,
     string name,
     int timeLimitInMilliseconds) where TContext : IClock
 {
     return(builder.PushComposite(children => new TimeLimit <TContext>(name, children[0], timeLimitInMilliseconds)));
 }
 public static FluentBuilder <TContext> Repeat <TContext>(
     this FluentBuilder <TContext> builder,
     string name,
     int repeatCount)
 {
     return(builder.PushComposite(children => new Repeat <TContext>(name, children[0], repeatCount)));
 }
 public static FluentBuilder <TContext> Cooldown <TContext>(
     this FluentBuilder <TContext> builder,
     string name,
     int cooldownTimeInMilliseconds) where TContext : IClock
 {
     return(builder.PushComposite(children => new Cooldown <TContext>(name, children[0], cooldownTimeInMilliseconds)));
 }
Esempio n. 10
0
 public static FluentBuilder <TContext> UntilFailed <TContext>(
     this FluentBuilder <TContext> builder,
     string name)
 {
     return(builder.Push(new UntilFailedNode {
         Name = name
     }));
 }
Esempio n. 11
0
 public static FluentBuilder <TContext> Sequence <TContext>(
     this FluentBuilder <TContext> builder,
     string name)
 {
     return(builder.Push(new SequenceNode {
         Name = name
     }));
 }
 public static FluentBuilder <TContext> Random <TContext>(
     this FluentBuilder <TContext> builder,
     string name,
     double threshold,
     IRandomProvider randomProvider = null)
 {
     return(builder.PushComposite(children => new Random <TContext>(name, children[0], threshold, randomProvider)));
 }
Esempio n. 13
0
 public static FluentBuilder <TContext> PrioritySelector <TContext>(
     this FluentBuilder <TContext> builder,
     string name)
 {
     return(builder.Push(new PrioritySelectorNode {
         Name = name
     }));
 }
Esempio n. 14
0
 public static FluentBuilder <TContext> AutoReset <TContext>(
     this FluentBuilder <TContext> builder,
     string name)
 {
     return(builder.Push(new AutoResetNode {
         Name = name
     }));
 }
Esempio n. 15
0
 public static FluentBuilder <TContext> Invert <TContext>(
     this FluentBuilder <TContext> builder,
     string name)
 {
     return(builder.Push(new InverterNode {
         Name = name
     }));
 }
Esempio n. 16
0
 public static FluentBuilder <TContext> AlwaysSucceed <TContext>(
     this FluentBuilder <TContext> builder,
     string name)
 {
     return(builder.Push(new SucceederNode {
         Name = name
     }));
 }
Esempio n. 17
0
 public static FluentBuilder <TContext> Repeat <TContext>(
     this FluentBuilder <TContext> builder,
     string name,
     int repeatCount)
 {
     return(builder.Push(new RepeatNode(repeatCount)
     {
         Name = name
     }));
 }
Esempio n. 18
0
 public static FluentBuilder <TContext> LimitCallRate <TContext>(
     this FluentBuilder <TContext> builder,
     string name,
     int intervalInMilliseconds)
 {
     return(builder.Push(new RateLimiterNode(intervalInMilliseconds)
     {
         Name = name
     }));
 }
Esempio n. 19
0
 public static FluentBuilder <TContext> Condition <TContext>(
     this FluentBuilder <TContext> builder,
     string name,
     Func <TContext, bool> condition)
 {
     return(builder.Push(new ConditionNode <TContext>(condition)
     {
         Name = name
     }));
 }
Esempio n. 20
0
 public static FluentBuilder <TContext> Cooldown <TContext>(
     this FluentBuilder <TContext> builder,
     string name,
     int cooldownTimeInMilliseconds)
 {
     return(builder.Push(new CooldownNode(cooldownTimeInMilliseconds)
     {
         Name = name
     }));
 }
Esempio n. 21
0
 public static FluentBuilder <TContext> TimeLimit <TContext>(
     this FluentBuilder <TContext> builder,
     string name,
     int timeLimitInMilliseconds)
 {
     return(builder.Push(new TimeLimitNode(timeLimitInMilliseconds)
     {
         Name = name
     }));
 }
Esempio n. 22
0
 public static FluentBuilder <TContext> SimpleParallel <TContext>(
     this FluentBuilder <TContext> builder,
     string name,
     Composites.SimpleParallelPolicy policy = Composites.SimpleParallelPolicy.BothMustSucceed)
 {
     return(builder.Push(new SimpleParallelNode(policy)
     {
         Name = name
     }));
 }
Esempio n. 23
0
 public static FluentBuilder <TContext> RandomSelector <TContext>(
     this FluentBuilder <TContext> builder,
     string name,
     IRandomProvider randomProvider = null)
 {
     return(builder.Push(new RandomSelectorNode(randomProvider)
     {
         Name = name
     }));
 }
Esempio n. 24
0
 public static FluentBuilder <TContext> Wait <TContext>(
     this FluentBuilder <TContext> builder,
     string name,
     int waitTimeInMilliseconds)
 {
     return(builder.Push(new WaitNode(waitTimeInMilliseconds)
     {
         Name = name
     }));
 }
Esempio n. 25
0
 public static FluentBuilder <TContext> Subtree <TContext>(
     this FluentBuilder <TContext> builder,
     string name,
     IBehaviour <TContext> subBehaviour)
 {
     return(builder.Push(new SubTreeNode <TContext>(subBehaviour)
     {
         Name = name
     }));
 }
Esempio n. 26
0
 public static FluentBuilder <TContext> Do <TContext>(
     this FluentBuilder <TContext> builder,
     string name,
     Func <TContext, BehaviourStatus> action)
 {
     return(builder.Push(new ActionNode <TContext>(action)
     {
         Name = name
     }));
 }
Esempio n. 27
0
 public static FluentBuilder <TContext> Random <TContext>(
     this FluentBuilder <TContext> builder,
     string name,
     double threshold,
     IRandomProvider randomProvider = null)
 {
     return(builder.Push(new RandomNode(threshold, randomProvider)
     {
         Name = name
     }));
 }
 public static FluentBuilder <TContext> Sequence <TContext>(
     this FluentBuilder <TContext> builder,
     string name)
 {
     return(builder.PushComposite(children => new Sequence <TContext>(name, children)));
 }
 public static FluentBuilder <TContext> Subtree <TContext>(
     this FluentBuilder <TContext> builder,
     IBehaviour <TContext> subBehaviour)
 {
     return(builder.PushLeaf(() => subBehaviour));
 }
 public static FluentBuilder <TContext> AutoReset <TContext>(
     this FluentBuilder <TContext> builder,
     string name)
 {
     return(builder.PushComposite(children => new AutoReset <TContext>(name, children[0])));
 }