Provides an abstract base class to create new debugging and tracing switches.
More...
|
| 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...
|
|
virtual void | OnValueChanged () |
| Invoked when the P:System.Diagnostics.Switch.Value property is changed. More...
|
|
Provides an abstract base class to create new debugging and tracing switches.
Definition at line 10 of file Switch.cs.
◆ Switch() [1/2]
System.Diagnostics.Switch.Switch |
( |
string |
displayName, |
|
|
string |
description |
|
) |
| |
|
protected |
Initializes a new instance of the T:System.Diagnostics.Switch class.
- Parameters
-
displayName | The name of the switch. |
description | The description for the switch. |
Definition at line 135 of file Switch.cs.
◆ Switch() [2/2]
System.Diagnostics.Switch.Switch |
( |
string |
displayName, |
|
|
string |
description, |
|
|
string |
defaultSwitchValue |
|
) |
| |
|
protected |
Initializes a new instance of the T:System.Diagnostics.Switch class, specifying the display name, description, and default value for the switch.
- Parameters
-
displayName | The name of the switch. |
description | The description of the switch. |
defaultSwitchValue | The default value for the switch. |
Definition at line 144 of file Switch.cs.
◆ GetSupportedAttributes()
virtual internal string [] System.Diagnostics.Switch.GetSupportedAttributes |
( |
| ) |
|
|
protectedvirtual |
Gets the custom attributes supported by the switch.
- Returns
- A string array that contains the names of the custom attributes supported by the switch, or
null
if there no custom attributes are supported.
Definition at line 269 of file Switch.cs.
◆ OnSwitchSettingChanged()
virtual void System.Diagnostics.Switch.OnSwitchSettingChanged |
( |
| ) |
|
|
protectedvirtual |
◆ OnValueChanged()
virtual void System.Diagnostics.Switch.OnValueChanged |
( |
| ) |
|
|
protectedvirtual |
◆ DisplayName
string System.Diagnostics.Switch.DisplayName => displayName |
Gets a name used to identify the switch.
- Returns
- The name used to identify the switch. The default value is an empty string ("").
Definition at line 52 of file Switch.cs.
◆ Attributes
Gets the custom switch attributes defined in the application configuration file.
- Returns
- A T:System.Collections.Specialized.StringDictionary containing the case-insensitive custom attributes for the trace switch.
Definition at line 38 of file Switch.cs.
◆ Description
string System.Diagnostics.Switch.Description |
|
get |
Gets a description of the switch.
- Returns
- The description of the switch. The default value is an empty string ("").
Definition at line 57 of file Switch.cs.
◆ SwitchSetting
int System.Diagnostics.Switch.SwitchSetting |
|
getsetprotected |
Gets or sets the current setting for this switch.
- Returns
- The current setting for this switch. The default is zero.
Definition at line 71 of file Switch.cs.
◆ Value
string System.Diagnostics.Switch.Value |
|
getsetprotected |
Gets or sets the value of the switch.
- Returns
- A string representing the value of the switch.
- Exceptions
-
T:System.Configuration.ConfigurationErrorsException | The value is null .-or-The value does not consist solely of an optional negative sign followed by a sequence of digits ranging from 0 to 9.-or-The value represents a number less than F:System.Int32.MinValue or greater than F:System.Int32.MaxValue. |
Definition at line 103 of file Switch.cs.
The documentation for this class was generated from the following file: