//
// System.Diagnostics.BooleanSwitch.cs
//
// Author:
// John R. Hicks (angryjohn69@nc.rr.com)
// Jonathan Pryor (jonpryor@vt.edu)
//
// (C) 2001-2002
//
namespace System.Diagnostics
{
///
/// Provides a simple on/off switch that controls debugging
/// and tracing output
///
public class BooleanSwitch : Switch
{
///
/// Initializes a new instance
///
public BooleanSwitch(string displayName, string description)
: base(displayName, description)
{
}
///
/// Specifies whether the switch is enabled or disabled
///
public bool Enabled {
// On .NET, any non-zero value is true. Only 0 is false.
get {return SwitchSetting != 0;}
set {
SwitchSetting = Convert.ToInt32(value);
}
}
}
}