using System; namespace Wayne.Lib { /// /// Factory for creating timers /// public interface ITimerFactory { /// /// Create a timer /// /// /// /// /// ITimer Create(int id, IIdentifiableEntity parentEntity, string name); /// /// Creates a timer /// /// /// /// /// /// /// ITimer Create(int id, IIdentifiableEntity parentEntity, string name, TState state); } /// /// Timer changer /// public interface ITimerChanger : IIdentifiableEntity, IDisposable { /// /// Changes the due time and interval of a timer. /// /// /// /// bool Change(TimeSpan? dueTime, TimeSpan? period); } /// /// Timer interface. /// public interface ITimer : ITimerChanger { /// /// Fired when the timer fires. /// event EventHandler OnTimeout; } /// /// Timer interface for a timer that has an argument. /// /// public interface ITimer : ITimerChanger { /// /// Fired when timer fires. /// event EventHandler> OnTimeout; } }