using System; namespace Chernobyl.Switch { /// /// The base interface for switches (also known as gates in boolean logic). /// A switch is a type that generates one or more events when one or more /// predefined conditions are met. /// public interface ISwitch { /// /// An event that is raised when this switch has been switched on. /// event EventHandler SwitchedOn; /// /// An event that is raised right after this switch has been switched /// off (or reset). /// event EventHandler SwitchedOff; /// /// Resets the switch to its original state or the its state after right /// after its creation. /// void Reset(); /// /// An event handler that can be assigned to an event. This event handler /// will reset the switch to its original state. It is exactly the same /// as calling . /// /// The sender of the event. /// The arguments to the event. void Reset(object sender, EventArgs e); } }