예제 #1
0
 bool ITrigger.Trigger(DateTime time, int succeedCount, int runningCount)
 {
     if (succeedCount + 1 > 1)
     {
         this.expired = true;
         return(false);
     }
     else if (succeedCount + runningCount + 1 > 1)
     {
         return(false);
     }
     if (this.tryTrigger != null)
     {
         ITrigger trigger = (ITrigger)this.tryTrigger;
         if (trigger.Expired)
         {
             this.expired = true;
             return(false);
         }
         bool ret = trigger.Trigger(time, this.hasTried, 0);
         if (ret)
         {
             this.hasTried++;
         }
         return(ret);
     }
     else
     {
         if (timeLimiter != null)
         {
             if (timeLimiter.Unarrive(time))
             {
                 return(false);
             }
             if (timeLimiter.Beyonded(time))
             {
                 this.expired = true;
                 return(false);
             }
             else
             {
                 return(true);
             }
         }
         else
         {
             return(true);
         }
     }
 }