EventListener.OnEventSourceCreated(EventSource) EventListener.OnEventSourceCreated(EventSource) EventListener.OnEventSourceCreated(EventSource) Method

定義

當事件接聽程式已建立且新事件來源已附加至接聽程式時,針對所有現有的事件來源來呼叫。Called for all existing event sources when the event listener is created and when a new event source is attached to the listener.

protected public:
 virtual void OnEventSourceCreated(System::Diagnostics::Tracing::EventSource ^ eventSource);
protected internal virtual void OnEventSourceCreated (System.Diagnostics.Tracing.EventSource eventSource);
abstract member OnEventSourceCreated : System.Diagnostics.Tracing.EventSource -> unit
override this.OnEventSourceCreated : System.Diagnostics.Tracing.EventSource -> unit

參數

eventSource
EventSource EventSource EventSource

事件的來源。The event source.

備註

事件來源實作應該要注意的事件接聽程式具現化時,將這些回呼發出的現有事件來源。Event source implementations should be aware that these callbacks are issued for existing event sources when the event listener is instantiated.

在多執行緒環境中,有可能OnEventWritten之前發生的回呼OnEventSourceCreated回呼。In a multithreaded environment, it is possible for OnEventWritten callbacks to occur before the OnEventSourceCreated callback.

適用於