// // System.Diagnostics.Switch.cs // // Author: // John R. Hicks (angryjohn69@nc.rr.com) // // (C) 2001 // namespace System.Diagnostics { /// /// Abstract base class to create new debugging and tracing switches /// public abstract class Switch { private string desc = ""; private string display_name = ""; private int iSwitch; // ================= Constructors =================== /// /// Initialize a new instance /// protected Switch(string displayName, string description) { display_name = displayName; desc = description; } /// /// Allows an Object to attempt to free resources and /// perform cleanup before the Object is reclaimed /// by the Garbage Collector /// ~Switch() { } // ================ Instance Methods ================ // ==================== Properties ================== /// /// Returns a description of the switch /// public string Description { get { return desc; } } /// /// Returns a name used to identify the switch /// public string DisplayName { get { return display_name; } } /// /// Gets or sets the current setting for this switch /// protected int SwitchSetting { get { return iSwitch; } set { if(iSwitch != value) { iSwitch = value; OnSwitchSettingChanged(); } } } /// /// Raises the SwitchSettingChanged event /// [MonoTODO] protected virtual void OnSwitchSettingChanged() { // TODO: implement me } } }