TraceSwitch.OnSwitchSettingChanged Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Updates and corrects the level for this switch.
protected:
override void OnSwitchSettingChanged();
protected override void OnSwitchSettingChanged ();
override this.OnSwitchSettingChanged : unit -> unit
Protected Overrides Sub OnSwitchSettingChanged ()
Remarks
The OnSwitchSettingChanged method is used by the .NET framework to validate and correct the value of a switch initialized via a configuration file. A message is written to all trace listeners if the switch value specified in the configuration file is not defined by the TraceLevel enumeration and the switch is set to a defined value.
If you attempt in your code to set the Level property to a value that is not defined by the TraceLevel enumeration, an ArgumentException exception is thrown.