public int CompareTo(ScheduledTask <T> other) => NextOccurance.CompareTo(other.NextOccurance);
public void Add(T task, Func <T, Task> taskFactory) { var managedTask = new ScheduledTask <T>(task, taskFactory); tasksQueue.Add(managedTask); }