System.Diagnostics.SwitchLevelAttribute Class

Identifies the level type for a switch.

See Also: SwitchLevelAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Class)]
[System.MonoLimitation("This attribute is not considered in trace support.")]
public sealed class SwitchLevelAttribute : Attribute

Remarks

This attribute is intended to be applied to all classes that inherit from the System.Diagnostics.Switch class. The purpose of the attribute is to identify the type that specifies the switch criteria of the switch. Each switch determines whether a trace is to be written, based on whether an event type matches or exceeds the value of the SwitchLevelAttribute.SwitchLevelType property for the switch. The type used for the SwitchLevelAttribute.SwitchLevelType property varies for different switches. For example, the switch level type for the System.Diagnostics.BooleanSwitch class is bool, and the switch level type for the System.Diagnostics.TraceSwitch class is System.Diagnostics.TraceLevel.

Requirements

Namespace: System.Diagnostics
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0