EventTypeFilter.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

トレース イベントの情報キャッシュを表す TraceEventCache

source
String

ソースの名前。

eventType
TraceEventType

TraceEventType 値のいずれか 1 つ。

id
Int32

トレース識別子番号。

formatOrMessage
String

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

args
Object[]

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

data1
Object

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

data
Object[]

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

戻り値

Boolean

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

注釈

パラメーターの値がプロパティの eventType 値以上の EventType 場合、メソッド trueは .

適用対象