TraceListener.TraceOutputOptions プロパティ

定義

トレース出力オプションを取得または設定します。

public:
 property System::Diagnostics::TraceOptions TraceOutputOptions { System::Diagnostics::TraceOptions get(); void set(System::Diagnostics::TraceOptions value); };
public System.Diagnostics.TraceOptions TraceOutputOptions { get; set; }
[System.Runtime.InteropServices.ComVisible(false)]
public System.Diagnostics.TraceOptions TraceOutputOptions { get; set; }
member this.TraceOutputOptions : System.Diagnostics.TraceOptions with get, set
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.TraceOutputOptions : System.Diagnostics.TraceOptions with get, set
Public Property TraceOutputOptions As TraceOptions

プロパティ値

列挙値のビットごとの組み合わせ。 既定値は、None です。

属性

例外

値が無効なため、設定操作に失敗しました。

次の例は、コンソール トレース リスナーの TraceOutputOptions プロパティの設定を示しています。 コンソール トレース リスナーは、トレース ソースの プロパティに Listeners 列挙されたリスナーの 1 つです。 このコード例は、TraceSource クラスのために提供されている大規模な例の一部です。

ts.Listeners["console"].TraceOutputOptions |= TraceOptions.Callstack;
ts.Listeners("console").TraceOutputOptions = ts.Listeners("console").TraceOutputOptions Or TraceOptions.Callstack

注釈

プロパティは TraceOutputOptions 、トレース出力のオプションの内容を決定します。 プロパティは、構成ファイルで設定することも、実行中にプログラムで設定して、コードのセクション専用の追加データを含めることもできます。 たとえば、コンソール トレース リスナーの プロパティを TraceOutputOptionsTraceOptions.Callstack 設定して、呼び出し履歴情報をトレース出力に追加できます。

TraceOptions列挙体は、次のクラスとメソッドでは使用されません。

適用対象