6 [SwitchLevel(typeof(
bool))]
17 if (base.SwitchSetting != 0)
26 base.SwitchSetting = (value ? 1 : 0);
34 : base(displayName, description)
42 public BooleanSwitch(
string displayName,
string description,
string defaultSwitchValue)
43 : base(displayName, description, defaultSwitchValue)
50 if (
bool.TryParse(base.Value, out
bool result))
52 base.SwitchSetting = (result ? 1 : 0);
56 base.OnValueChanged();
Provides a simple on/off switch that controls debugging and tracing output.
bool? Enabled
Gets or sets a value indicating whether the switch is enabled or disabled.
Describes a set of security permissions applied to code. This class cannot be inherited.
BooleanSwitch(string displayName, string description, string defaultSwitchValue)
Initializes a new instance of the T:System.Diagnostics.BooleanSwitch class with the specified display...
SecurityAction
Specifies the security actions that can be performed using declarative security.
BooleanSwitch(string displayName, string description)
Initializes a new instance of the T:System.Diagnostics.BooleanSwitch class with the specified display...
override void OnValueChanged()
Determines whether the new value of the P:System.Diagnostics.Switch.Value property can be parsed as a...
SecurityPermissionFlag
Specifies access flags for the security permission object.
Provides an abstract base class to create new debugging and tracing switches.