Пример #1
0
 protected TimerJob(Action <CancellationToken> action, TimeSpan span, JobExecutionType executionType)
 {
     Action         = action;
     Span           = span;
     _executionType = executionType;
 }
Пример #2
0
 public InfinityTimerJob(Action <CancellationToken> action, TimeSpan span, JobExecutionType executionType) : base(action, span, executionType)
 {
 }
Пример #3
0
 public void AddUntil(Action <CancellationToken> action, TimeSpan timeSpan, JobExecutionType executionType, Func <bool> condition)
 {
     throw new NotImplementedException();
 }
Пример #4
0
 public Specified(Action <CancellationToken> action, TimeSpan span, JobExecutionType executionType, long remaindedExecutionTime = 0) : base(action, span, executionType)
 {
     _remaindedExecutionTime = remaindedExecutionTime;
 }
Пример #5
0
 public void AddNumberTimes(Action <CancellationToken> action, TimeSpan timeSpan, JobExecutionType executionType, long times = 0)
 {
     if (times > 0)
     {
         AddJob(new Specified(action, timeSpan, executionType, times));
     }
     else
     {
         AddJob(new InfinityTimerJob(action, timeSpan, executionType));
     }
 }