コード例 #1
0
        public static Polyface IsConditionalWaiter(this Polyface root, ICondition condition, ICondition stopWaitingCondition)
        {
            Condition.Requires(root).IsNotNull();
            var bg = new ConditionalWaiter(condition, stopWaitingCondition);

            root.Is(bg);
            return(root);
        }
コード例 #2
0
ファイル: Tests.cs プロジェクト: Piirtaa/Decoratid
 public WaiterTest()
     : base(LogicOf <Nothing> .New((x) =>
 {
     var flagDate       = DateTime.Now.AddSeconds(5);
     ICondition cond    = StrategizedCondition.New(() => { return(DateTime.Now < flagDate); });
     ICondition expCond = StrategizedCondition.New(() => { return(DateTime.Now > flagDate.AddSeconds(1)); });
     var waiter         = ConditionalWaiter.New(cond, expCond);
     waiter.WaitAround();
 }))
 {
 }
コード例 #3
0
 public static Polyface IsConditionalWaiter(this Polyface root, ICondition condition, ICondition stopWaitingCondition)
 {
     Condition.Requires(root).IsNotNull();
     var bg = new ConditionalWaiter(condition, stopWaitingCondition);
     root.Is(bg);
     return root;
 }