TraceSource.Switch プロパティ
定義
ソース スイッチ値を取得または設定します。Gets or sets the source switch value.
public:
property System::Diagnostics::SourceSwitch ^ Switch { System::Diagnostics::SourceSwitch ^ get(); void set(System::Diagnostics::SourceSwitch ^ value); };
public System.Diagnostics.SourceSwitch Switch { get; set; }
member this.Switch : System.Diagnostics.SourceSwitch with get, set
Public Property Switch As SourceSwitch
プロパティ値
ソース スイッチ値を表す SourceSwitch オブジェクト。A SourceSwitch object representing the source switch value.
例外
注釈
Switchプロパティを使用すると、トレースソースがリスナーを呼び出す前に、メッセージをフィルター処理できます。The Switch property allows the filtering of messages before the trace source calls the listeners.
このスイッチは、トレース呼び出しを生成するか無視するかを確認するために使用されます。The switch is used to check whether trace calls should be generated or ignored. 各トレースメソッド ShouldTrace は、のメソッドを呼び出して、 SourceSwitch トレースを続行するかどうかを決定します。Each trace method calls the ShouldTrace method of the SourceSwitch to determine whether to proceed with the trace. 呼び出しでが返さ true
れると、リスナーが呼び出されます。If the call returns true
, the listeners are called.