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

인덱스를 찾을 이벤트 소스입니다.

반환

지정된 이벤트 소스를 나타내는 음수가 아닌 작은 숫자입니다.

설명

에서 반환되는 EventSourceIndex 값은 배열 인덱싱에 적합한 이벤트 원본을 식별합니다. 이 정수는 애플리케이션 도메인 내에서 고유 합니다. 이벤트 수신기는 연결된 각 이벤트 원본에 대한 추가 정보를 저장하는 것이 유용할 수 있습니다. 에서 반환된 EventSourceIndex 값을 사용하면 이 추가 정보를 과 같은 List<T>확장 가능한 배열에 효율적으로 저장할 수 있습니다.

적용 대상