public async Task OnStart(CancellationToken cancellationToken) { foreach (var item in Timers) { ScheduledService.AddTimer(item); } ScheduledService.Start(); await Task.CompletedTask; }
public TimerAutowire(ScheduledService scheduledService, IEnumerable <ITimer> timers) { ScheduledService = scheduledService; Timers = timers; }