mscorlib(4.0.0.0) API with additions
System.Diagnostics.BooleanSwitch Class Reference

Provides a simple on/off switch that controls debugging and tracing output. More...

Inheritance diagram for System.Diagnostics.BooleanSwitch:
[legend]
Collaboration diagram for System.Diagnostics.BooleanSwitch:
[legend]

Public Member Functions

 BooleanSwitch (string displayName, string description)
 Initializes a new instance of the T:System.Diagnostics.BooleanSwitch class with the specified display name and description. More...
 
 BooleanSwitch (string displayName, string description, string defaultSwitchValue)
 Initializes a new instance of the T:System.Diagnostics.BooleanSwitch class with the specified display name, description, and default switch value. More...
 

Protected Member Functions

override void OnValueChanged ()
 Determines whether the new value of the P:System.Diagnostics.Switch.Value property can be parsed as a Boolean value. More...
 
- Protected Member Functions inherited from System.Diagnostics.Switch
 Switch (string displayName, string description)
 Initializes a new instance of the T:System.Diagnostics.Switch class. More...
 
 Switch (string displayName, string description, string defaultSwitchValue)
 Initializes a new instance of the T:System.Diagnostics.Switch class, specifying the display name, description, and default value for the switch. More...
 
virtual internal string [] GetSupportedAttributes ()
 Gets the custom attributes supported by the switch. More...
 
virtual void OnSwitchSettingChanged ()
 Invoked when the P:System.Diagnostics.Switch.SwitchSetting property is changed. More...
 

Properties

bool? Enabled [get, set]
 Gets or sets a value indicating whether the switch is enabled or disabled. More...
 
- Properties inherited from System.Diagnostics.Switch
StringDictionary Attributes [get]
 Gets the custom switch attributes defined in the application configuration file. More...
 
string Description [get]
 Gets a description of the switch. More...
 
int SwitchSetting [get, set]
 Gets or sets the current setting for this switch. More...
 
string Value [get, set]
 Gets or sets the value of the switch. More...
 

Additional Inherited Members

- Public Attributes inherited from System.Diagnostics.Switch
string DisplayName => displayName
 Gets a name used to identify the switch. More...
 

Detailed Description

Provides a simple on/off switch that controls debugging and tracing output.

Definition at line 7 of file BooleanSwitch.cs.

Constructor & Destructor Documentation

◆ BooleanSwitch() [1/2]

System.Diagnostics.BooleanSwitch.BooleanSwitch ( string  displayName,
string  description 
)

Initializes a new instance of the T:System.Diagnostics.BooleanSwitch class with the specified display name and description.

Parameters
displayNameThe name to display on a user interface.
descriptionThe description of the switch.

Definition at line 33 of file BooleanSwitch.cs.

◆ BooleanSwitch() [2/2]

System.Diagnostics.BooleanSwitch.BooleanSwitch ( string  displayName,
string  description,
string  defaultSwitchValue 
)

Initializes a new instance of the T:System.Diagnostics.BooleanSwitch class with the specified display name, description, and default switch value.

Parameters
displayNameThe name to display on the user interface.
descriptionThe description of the switch.
defaultSwitchValueThe default value of the switch.

Definition at line 42 of file BooleanSwitch.cs.

Member Function Documentation

◆ OnValueChanged()

override void System.Diagnostics.BooleanSwitch.OnValueChanged ( )
protectedvirtual

Determines whether the new value of the P:System.Diagnostics.Switch.Value property can be parsed as a Boolean value.

Reimplemented from System.Diagnostics.Switch.

Definition at line 48 of file BooleanSwitch.cs.

Property Documentation

◆ Enabled

bool? System.Diagnostics.BooleanSwitch.Enabled
getset

Gets or sets a value indicating whether the switch is enabled or disabled.

Returns
true if the switch is enabled; otherwise, false. The default is false.
Exceptions
T:System.Security.SecurityExceptionThe caller does not have the correct permission.

Definition at line 14 of file BooleanSwitch.cs.


The documentation for this class was generated from the following file: