// Notice that we inject a single IBackgroundEventHandler here although there can be (actually are) multiple implementations. As we'll see // in a moment, there is a good amount of magic involved. public BackgroundTask(IBackgroundEventHandler eventHandler) { _eventHandler = eventHandler; }
public ScheduledTask(IBackgroundEventHandler eventHandler, IScheduledTaskManager taskManager, IClock clock) { _eventHandler = eventHandler; _taskManager = taskManager; _clock = clock; }