protected abstract void _Schedule([NotNull] RecurringEvent whatAndWhen);
Beispiel #2
0
 protected override void _Schedule(RecurringEvent whatAndWhen)
 {
     whatAndWhen.Cancelable = new Timer(_ => whatAndWhen.Action(), null, TimeSpan.Zero,
                                        whatAndWhen.Frequency);
 }
 protected override void _Schedule(RecurringEvent whatAndWhen)
 {
     _triggers.Add(whatAndWhen);
     whatAndWhen.Cancelable = new StackJanitor(() => _triggers.Remove(whatAndWhen));
 }
Beispiel #4
0
 public Task StartAutoplay()
 {
     _slideAdvancer = _clock.Schedule(TimeSpan.FromSeconds(_machine.SlideAdvanceSpeed), AdvanceSlide);
     return(AdvanceSlide());
 }