EventListener.EventSourceIndex(EventSource) メソッド

定義

指定されたイベント ソースを表す負でない小さい数値を取得します。

protected:
 static int EventSourceIndex(System::Diagnostics::Tracing::EventSource ^ eventSource);
public:
 static int EventSourceIndex(System::Diagnostics::Tracing::EventSource ^ eventSource);
protected static int EventSourceIndex (System.Diagnostics.Tracing.EventSource eventSource);
public static int EventSourceIndex (System.Diagnostics.Tracing.EventSource eventSource);
static member EventSourceIndex : System.Diagnostics.Tracing.EventSource -> int
Protected Shared Function EventSourceIndex (eventSource As EventSource) As Integer
Public Shared Function EventSourceIndex (eventSource As EventSource) As Integer

パラメーター

eventSource
EventSource

インデックスを検索するイベント ソース。

戻り値

Int32

指定されたイベント ソースを表す負でない小さい数値。

注釈

返される EventSourceIndex 値は、配列のインデックス作成に適したイベント ソースを識別します。 この整数は、アプリケーション ドメイン内で一意です。 イベント リスナーは、それに接続されている各イベント ソースに関する追加情報を格納すると便利な場合があります。 返される値を EventSourceIndex 使用すると、この追加情報を、次のような List<T>拡張可能な配列に効率的に格納できます。

適用対象