SourceFilter.ShouldTrace メソッド

定義

トレース リスナーでイベントをトレースする必要があるかどうかを決定します。

public:
 override bool ShouldTrace(System::Diagnostics::TraceEventCache ^ cache, System::String ^ source, System::Diagnostics::TraceEventType eventType, int id, System::String ^ formatOrMessage, cli::array <System::Object ^> ^ args, System::Object ^ data1, cli::array <System::Object ^> ^ data);
public override bool ShouldTrace (System.Diagnostics.TraceEventCache? cache, string source, System.Diagnostics.TraceEventType eventType, int id, string? formatOrMessage, object?[]? args, object? data1, object?[]? data);
public override bool ShouldTrace (System.Diagnostics.TraceEventCache cache, string source, System.Diagnostics.TraceEventType eventType, int id, string formatOrMessage, object[] args, object data1, object[] data);
override this.ShouldTrace : System.Diagnostics.TraceEventCache * string * System.Diagnostics.TraceEventType * int * string * obj[] * obj * obj[] -> bool
Public Overrides Function ShouldTrace (cache As TraceEventCache, source As String, eventType As TraceEventType, id As Integer, formatOrMessage As String, args As Object(), data1 As Object, data As Object()) As Boolean

パラメーター

cache
TraceEventCache

トレース イベントの情報キャッシュを表すオブジェクト。

source
String

ソースの名前。

eventType
TraceEventType

イベントの種類を識別する列挙値の 1 つ。

id
Int32

トレース識別子番号。

formatOrMessage
String

引数の配列を書き込むために使用する形式、または書き込むメッセージの形式。

args
Object[]

引数オブジェクトの配列。

data1
Object

トレース データ オブジェクト。

data
Object[]

トレース データ オブジェクトの配列。

戻り値

トレースを作成する必要がある場合は true。それ以外の場合は false

例外

sourcenull です。

注釈

パラメーターの値が source プロパティの値 Source と一致する場合、 メソッドは を返します true

適用対象