EventListener.EnableEvents EventListener.EnableEvents EventListener.EnableEvents Method

定義

啟用指定之事件來源的事件。Enables events for the specified event source.

多載

EnableEvents(EventSource, EventLevel) EnableEvents(EventSource, EventLevel) EnableEvents(EventSource, EventLevel)

啟用具有指定詳細等級或更低之指定事件來源的事件。Enables events for the specified event source that has the specified verbosity level or lower.

EnableEvents(EventSource, EventLevel, EventKeywords) EnableEvents(EventSource, EventLevel, EventKeywords) EnableEvents(EventSource, EventLevel, EventKeywords)

啟用具有指定詳細等級或更低且符合關鍵字旗標之指定事件來源的事件。Enables events for the specified event source that has the specified verbosity level or lower, and matching keyword flags.

EnableEvents(EventSource, EventLevel, EventKeywords, IDictionary<String,String>) EnableEvents(EventSource, EventLevel, EventKeywords, IDictionary<String,String>) EnableEvents(EventSource, EventLevel, EventKeywords, IDictionary<String,String>)

啟用具有指定詳細等級或更低且符合關鍵字旗標及引數之指定事件來源的事件。Enables events for the specified event source that has the specified verbosity level or lower, matching event keyword flag, and matching arguments.

EnableEvents(EventSource, EventLevel) EnableEvents(EventSource, EventLevel) EnableEvents(EventSource, EventLevel)

啟用具有指定詳細等級或更低之指定事件來源的事件。Enables events for the specified event source that has the specified verbosity level or lower.

public:
 void EnableEvents(System::Diagnostics::Tracing::EventSource ^ eventSource, System::Diagnostics::Tracing::EventLevel level);
public void EnableEvents (System.Diagnostics.Tracing.EventSource eventSource, System.Diagnostics.Tracing.EventLevel level);
member this.EnableEvents : System.Diagnostics.Tracing.EventSource * System.Diagnostics.Tracing.EventLevel -> unit

參數

eventSource
EventSource EventSource EventSource

要為其啟用事件的事件來源。The event source to enable events for.

level
EventLevel EventLevel EventLevel

要啟用的事件的層級。The level of events to enable.

備註

如果Guid屬性中指定eventSourceEmpty,應用程式定義域中的所有事件來源會受到都影響。If the Guid property in the specified eventSource is Empty, all event sources in the application domain are affected.

EnableEvents(EventSource, EventLevel, EventKeywords) EnableEvents(EventSource, EventLevel, EventKeywords) EnableEvents(EventSource, EventLevel, EventKeywords)

啟用具有指定詳細等級或更低且符合關鍵字旗標之指定事件來源的事件。Enables events for the specified event source that has the specified verbosity level or lower, and matching keyword flags.

public:
 void EnableEvents(System::Diagnostics::Tracing::EventSource ^ eventSource, System::Diagnostics::Tracing::EventLevel level, System::Diagnostics::Tracing::EventKeywords matchAnyKeyword);
public void EnableEvents (System.Diagnostics.Tracing.EventSource eventSource, System.Diagnostics.Tracing.EventLevel level, System.Diagnostics.Tracing.EventKeywords matchAnyKeyword);
member this.EnableEvents : System.Diagnostics.Tracing.EventSource * System.Diagnostics.Tracing.EventLevel * System.Diagnostics.Tracing.EventKeywords -> unit

參數

eventSource
EventSource EventSource EventSource

要為其啟用事件的事件來源。The event source to enable events for.

level
EventLevel EventLevel EventLevel

要啟用的事件的層級。The level of events to enable.

matchAnyKeyword
EventKeywords EventKeywords EventKeywords

啟用事件所需的關鍵字旗標。The keyword flags necessary to enable the events.

備註

如果Guid屬性中指定eventSourceEmpty,應用程式定義域中的所有事件來源會受到都影響。If the Guid property in the specified eventSource is Empty, all event sources in the application domain are affected.

EnableEvents(EventSource, EventLevel, EventKeywords, IDictionary<String,String>) EnableEvents(EventSource, EventLevel, EventKeywords, IDictionary<String,String>) EnableEvents(EventSource, EventLevel, EventKeywords, IDictionary<String,String>)

啟用具有指定詳細等級或更低且符合關鍵字旗標及引數之指定事件來源的事件。Enables events for the specified event source that has the specified verbosity level or lower, matching event keyword flag, and matching arguments.

public:
 void EnableEvents(System::Diagnostics::Tracing::EventSource ^ eventSource, System::Diagnostics::Tracing::EventLevel level, System::Diagnostics::Tracing::EventKeywords matchAnyKeyword, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ arguments);
public void EnableEvents (System.Diagnostics.Tracing.EventSource eventSource, System.Diagnostics.Tracing.EventLevel level, System.Diagnostics.Tracing.EventKeywords matchAnyKeyword, System.Collections.Generic.IDictionary<string,string> arguments);
member this.EnableEvents : System.Diagnostics.Tracing.EventSource * System.Diagnostics.Tracing.EventLevel * System.Diagnostics.Tracing.EventKeywords * System.Collections.Generic.IDictionary<string, string> -> unit

參數

eventSource
EventSource EventSource EventSource

要為其啟用事件的事件來源。The event source to enable events for.

level
EventLevel EventLevel EventLevel

要啟用的事件的層級。The level of events to enable.

matchAnyKeyword
EventKeywords EventKeywords EventKeywords

啟用事件所需的關鍵字旗標。The keyword flags necessary to enable the events.

arguments
IDictionary<String,String>

要啟用事件所比對的引數。The arguments to be matched to enable the events.

備註

如果Guid屬性中指定eventSourceEmpty,應用程式定義域中的所有事件來源會受到都影響。If the Guid property in the specified eventSource is Empty, all event sources in the application domain are affected.

適用於