EventSource 생성자

정의

EventSource 클래스의 새 인스턴스를 만듭니다.

오버로드

EventSource()

EventSource 클래스의 새 인스턴스를 만듭니다.

EventSource(Boolean)

EventSource 클래스의 새 인스턴스를 만들고 기본 Windows 코드에서 오류가 발생할 때 예외를 throw할지 여부를 지정합니다.

EventSource(EventSourceSettings)

지정된 구성 설정을 사용하여 EventSource 클래스의 새 인스턴스를 만듭니다.

EventSource(String)

지정된 이름을 사용하여 EventSource 클래스의 새 인스턴스를 만듭니다.

EventSource(EventSourceSettings, String[])

지정된 설정 및 특성을 포함하는 비 계약 이벤트와 함께 사용되는 EventSource의 새 인스턴스를 초기화합니다.

EventSource(String, EventSourceSettings)

지정된 이름 및 설정을 사용하여 EventSource 클래스의 새 인스턴스를 만듭니다.

EventSource(String, EventSourceSettings, String[])

지정된 구성 설정을 사용하여 EventSource 클래스의 새 인스턴스를 만듭니다.

EventSource()

Source:
EventSource.cs
Source:
EventSource.cs
Source:
EventSource.cs

EventSource 클래스의 새 인스턴스를 만듭니다.

protected:
 EventSource();
protected EventSource ();
Protected Sub New ()

적용 대상

EventSource(Boolean)

Source:
EventSource.cs
Source:
EventSource.cs
Source:
EventSource.cs

EventSource 클래스의 새 인스턴스를 만들고 기본 Windows 코드에서 오류가 발생할 때 예외를 throw할지 여부를 지정합니다.

protected:
 EventSource(bool throwOnEventWriteErrors);
protected EventSource (bool throwOnEventWriteErrors);
new System.Diagnostics.Tracing.EventSource : bool -> System.Diagnostics.Tracing.EventSource
Protected Sub New (throwOnEventWriteErrors As Boolean)

매개 변수

throwOnEventWriteErrors
Boolean

기본 Windows 코드에서 오류가 발생할 때 예외를 throw하려면 true이고, 그렇지 않으면 false입니다.

적용 대상

EventSource(EventSourceSettings)

Source:
EventSource.cs
Source:
EventSource.cs
Source:
EventSource.cs

지정된 구성 설정을 사용하여 EventSource 클래스의 새 인스턴스를 만듭니다.

protected:
 EventSource(System::Diagnostics::Tracing::EventSourceSettings settings);
protected EventSource (System.Diagnostics.Tracing.EventSourceSettings settings);
new System.Diagnostics.Tracing.EventSource : System.Diagnostics.Tracing.EventSourceSettings -> System.Diagnostics.Tracing.EventSource
Protected Sub New (settings As EventSourceSettings)

매개 변수

settings
EventSourceSettings

구성 설정을 지정하여 이벤트 소스에 적용하는 열거형 값의 비트 조합입니다.

설명

settings 가 생성되는 시기를 EventSource 지정하면 이벤트가 매니페스트 기반 형식으로 작성되는지 아니면 자체 설명 형식으로 작성되는지 지정할 수 있습니다. 또한 이벤트 작성 프로세스 중에 오류가 발생할 때 예외가 발생되도록 지정할 수 있습니다.

적용 대상

EventSource(String)

Source:
TraceLoggingEventSource.cs
Source:
TraceLoggingEventSource.cs
Source:
TraceLoggingEventSource.cs

지정된 이름을 사용하여 EventSource 클래스의 새 인스턴스를 만듭니다.

public:
 EventSource(System::String ^ eventSourceName);
public EventSource (string eventSourceName);
new System.Diagnostics.Tracing.EventSource : string -> System.Diagnostics.Tracing.EventSource
Public Sub New (eventSourceName As String)

매개 변수

eventSourceName
String

이벤트 소스에 적용할 이름입니다. null이 아니어야 합니다.

예외

eventSourceName이(가) null인 경우

설명

이 생성자를 사용하는 경우 인수가 해당 형식의 eventSourceName 특성에 정의된 EventSourceAttribute ETW 이름과 일치하는지 확인합니다. 그렇지 않으면 속성에서 반환 Guid 된 GUID와 메서드가 GetGuid(Type) 다릅니다. 이벤트 원본 이름이 다른 경우 속성은 Guid ETW에 이 EventSource를 등록하는 데 사용되는 GUID를 반환합니다.

적용 대상

EventSource(EventSourceSettings, String[])

Source:
EventSource.cs
Source:
EventSource.cs
Source:
EventSource.cs

지정된 설정 및 특성을 포함하는 비 계약 이벤트와 함께 사용되는 EventSource의 새 인스턴스를 초기화합니다.

protected:
 EventSource(System::Diagnostics::Tracing::EventSourceSettings settings, ... cli::array <System::String ^> ^ traits);
protected EventSource (System.Diagnostics.Tracing.EventSourceSettings settings, params string[] traits);
protected EventSource (System.Diagnostics.Tracing.EventSourceSettings settings, params string[]? traits);
new System.Diagnostics.Tracing.EventSource : System.Diagnostics.Tracing.EventSourceSettings * string[] -> System.Diagnostics.Tracing.EventSource
Protected Sub New (settings As EventSourceSettings, ParamArray traits As String())

매개 변수

settings
EventSourceSettings

구성 설정을 지정하여 이벤트 소스에 적용하는 열거형 값의 비트 조합입니다.

traits
String[]

이벤트 원본에 대한 특성을 지정하는 키-값 쌍입니다.

예외

traits가 키-값 쌍으로 지정되지 않습니다.

설명

특성은 이벤트에 대한 추가 정보를 제공하며 이벤트 수신기에 의해 해석됩니다. 특성은 키-값 쌍으로 지정되며 쌍으로 지정되지 않은 경우 예외가 발생합니다. 키를 , 메서드에 전달하여 특성을 검색할 GetTrait수 있습니다.

settings 가 생성되는 시기를 EventSource 지정하면 이벤트가 매니페스트 기반 형식으로 작성되는지 아니면 자체 설명 형식으로 작성되는지 지정할 수 있습니다. 또한 이벤트 작성 프로세스 중에 오류가 발생할 때 예외가 발생되도록 지정할 수 있습니다.

추가 정보

적용 대상

EventSource(String, EventSourceSettings)

Source:
TraceLoggingEventSource.cs
Source:
TraceLoggingEventSource.cs
Source:
TraceLoggingEventSource.cs

지정된 이름 및 설정을 사용하여 EventSource 클래스의 새 인스턴스를 만듭니다.

public:
 EventSource(System::String ^ eventSourceName, System::Diagnostics::Tracing::EventSourceSettings config);
public EventSource (string eventSourceName, System.Diagnostics.Tracing.EventSourceSettings config);
new System.Diagnostics.Tracing.EventSource : string * System.Diagnostics.Tracing.EventSourceSettings -> System.Diagnostics.Tracing.EventSource
Public Sub New (eventSourceName As String, config As EventSourceSettings)

매개 변수

eventSourceName
String

이벤트 소스에 적용할 이름입니다. null이 아니어야 합니다.

config
EventSourceSettings

구성 설정을 지정하여 이벤트 소스에 적용하는 열거형 값의 비트 조합입니다.

예외

eventSourceName이(가) null인 경우

설명

settings 가 생성되는 시기를 EventSource 지정하면 이벤트가 매니페스트 기반 형식으로 작성되는지 아니면 자체 설명 형식으로 작성되는지 지정할 수 있습니다. 또한 이벤트 작성 프로세스 중에 오류가 발생할 때 예외가 발생되도록 지정할 수 있습니다.

이 생성자를 사용하는 경우 인수가 해당 형식의 eventSourceName 특성에 정의된 EventSourceAttribute ETW 이름과 일치하는지 확인합니다. 그렇지 않으면 속성에서 반환 Guid 된 GUID와 메서드가 GetGuid(Type) 다릅니다.

이러한 경우 속성은 Guid ETW에 이 EventSource를 등록하는 데 사용되는 GUID를 반환합니다.

적용 대상

EventSource(String, EventSourceSettings, String[])

Source:
TraceLoggingEventSource.cs
Source:
TraceLoggingEventSource.cs
Source:
TraceLoggingEventSource.cs

지정된 구성 설정을 사용하여 EventSource 클래스의 새 인스턴스를 만듭니다.

public:
 EventSource(System::String ^ eventSourceName, System::Diagnostics::Tracing::EventSourceSettings config, ... cli::array <System::String ^> ^ traits);
public EventSource (string eventSourceName, System.Diagnostics.Tracing.EventSourceSettings config, params string[] traits);
public EventSource (string eventSourceName, System.Diagnostics.Tracing.EventSourceSettings config, params string[]? traits);
new System.Diagnostics.Tracing.EventSource : string * System.Diagnostics.Tracing.EventSourceSettings * string[] -> System.Diagnostics.Tracing.EventSource
Public Sub New (eventSourceName As String, config As EventSourceSettings, ParamArray traits As String())

매개 변수

eventSourceName
String

이벤트 소스에 적용할 이름입니다. null이 아니어야 합니다.

config
EventSourceSettings

구성 설정을 지정하여 이벤트 소스에 적용하는 열거형 값의 비트 조합입니다.

traits
String[]

이벤트 원본에 대한 특성을 지정하는 키-값 쌍입니다.

예외

eventSourceName이(가) null인 경우

traits가 키-값 쌍으로 지정되지 않습니다.

설명

특성은 이벤트에 대한 추가 정보를 제공하며 이벤트 수신기에 의해 해석됩니다. 특성은 키-값 쌍으로 지정되며 쌍으로 지정되지 않은 경우 예외가 발생합니다. 키를 , 메서드에 전달하여 특성을 검색할 GetTrait수 있습니다.

config 가 생성되는 시기를 EventSource 지정하면 이벤트가 매니페스트 기반 형식으로 작성되는지 아니면 자체 설명 형식으로 작성되는지 지정할 수 있습니다. 또한 이벤트 작성 프로세스 중에 오류가 발생할 때 예외가 발생되도록 지정할 수 있습니다.

이 생성자를 사용하는 경우 인수가 해당 형식의 eventSourceName 특성에 정의된 EventSourceAttribute ETW 이름과 일치하는지 확인합니다. 그렇지 않으면 속성에서 반환 Guid 된 GUID와 메서드가 GetGuid(Type) 다릅니다.

이러한 경우 ETW에 이 EventSource를 등록하는 데 사용되는 GUID는 에서 반환하는 GuidGUID입니다.

추가 정보

적용 대상