using System; namespace ZeroLevel.Services.Shedulling { public interface IExpirationSheduller : IDisposable { /// /// Adding a task with the time after which it should be completed /// long Push(TimeSpan timespan, Action callback); /// /// Adding a task with the date / time when it should be executed /// long Push(DateTime date, Action callback); /// /// Delete task by ID /// /// Task ID bool Remove(long key); /// /// Cleaning the scheduler /// void Clean(); /// /// Pausing the scheduler (does not prevent the addition of new tasks) /// void Pause(); /// /// Resumption of work scheduler /// void Resume(); } }