public IDisposable Schedule <TState>(TState state, Func <IScheduler, TState, IDisposable> action) { ScheduledItems.Add(new Tuple <Action, TimeSpan?>(null, null)); return(InnerScheduler.Schedule(state, action)); }
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)); }