예제 #1
0
 public IDisposable Schedule <TState>(TState state, Func <IScheduler, TState, IDisposable> action)
 {
     ScheduledItems.Add(new Tuple <Action, TimeSpan?>(null, null));
     return(InnerScheduler.Schedule(state, action));
 }
예제 #2
0
 public IDisposable Schedule <TState>(TState state, TimeSpan dueTime, Func <IScheduler, TState, IDisposable> action)
 {
     ScheduledItems.Add(new Tuple <Action, TimeSpan?>(() => action(this, state), dueTime));
     return(InnerScheduler.Schedule(state, dueTime, action));
 }