Provides a multilevel switch to control tracing and debug output without recompiling your code.
More...
|
| SourceSwitch (string name) |
| Initializes a new instance of the T:System.Diagnostics.SourceSwitch class, specifying the name of the source. More...
|
|
| SourceSwitch (string displayName, string defaultSwitchValue) |
| Initializes a new instance of the T:System.Diagnostics.SourceSwitch class, specifying the display name and the default value for the source switch. More...
|
|
bool | ShouldTrace (TraceEventType eventType) |
| Determines if trace listeners should be called, based on the trace event type. More...
|
|
|
override void | OnValueChanged () |
| Invoked when the value of the P:System.Diagnostics.Switch.Value property changes. 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...
|
|
Provides a multilevel switch to control tracing and debug output without recompiling your code.
Definition at line 6 of file SourceSwitch.cs.
◆ SourceSwitch() [1/2]
System.Diagnostics.SourceSwitch.SourceSwitch |
( |
string |
name | ) |
|
Initializes a new instance of the T:System.Diagnostics.SourceSwitch class, specifying the name of the source.
- Parameters
-
name | The name of the source. |
Definition at line 25 of file SourceSwitch.cs.
◆ SourceSwitch() [2/2]
System.Diagnostics.SourceSwitch.SourceSwitch |
( |
string |
displayName, |
|
|
string |
defaultSwitchValue |
|
) |
| |
Initializes a new instance of the T:System.Diagnostics.SourceSwitch class, specifying the display name and the default value for the source switch.
- Parameters
-
displayName | The name of the source switch. |
defaultSwitchValue | The default value for the switch. |
Definition at line 33 of file SourceSwitch.cs.
◆ OnValueChanged()
override void System.Diagnostics.SourceSwitch.OnValueChanged |
( |
| ) |
|
|
protectedvirtual |
Invoked when the value of the P:System.Diagnostics.Switch.Value property changes.
- Exceptions
-
T:System.ArgumentException | The new value of P:System.Diagnostics.Switch.Value is not one of the T:System.Diagnostics.SourceLevels values. |
Reimplemented from System.Diagnostics.Switch.
Definition at line 49 of file SourceSwitch.cs.
◆ ShouldTrace()
bool System.Diagnostics.SourceSwitch.ShouldTrace |
( |
TraceEventType |
eventType | ) |
|
Determines if trace listeners should be called, based on the trace event type.
- Parameters
-
eventType | One of the T:System.Diagnostics.TraceEventType values. |
- Returns
True
if the trace listeners should be called; otherwise, false
.
Definition at line 42 of file SourceSwitch.cs.
◆ Level
Gets or sets the level of the switch.
- Returns
- One of the T:System.Diagnostics.SourceLevels values that represents the event level of the switch.
Definition at line 11 of file SourceSwitch.cs.
The documentation for this class was generated from the following file: