EventListener.OnEventSourceCreated(EventSource) Metodo

Definizione

Chiamato per tutte le origini evento esistenti quando viene creato il listener di eventi e una nuova origine evento viene associata al listener.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

Parametri

eventSource
EventSource

Origine evento.The event source.

Commenti

Le implementazioni dell'origine evento devono essere consapevoli del fatto che questi callback vengono emessi per le origini eventi esistenti quando viene creata un'istanza del listener di eventi.Event source implementations should be aware that these callbacks are issued for existing event sources when the event listener is instantiated.

In un ambiente con multithreading, è possibile che i callback OnEventWritten vengano eseguiti prima del callback di OnEventSourceCreated.In a multithreaded environment, it is possible for OnEventWritten callbacks to occur before the OnEventSourceCreated callback.

Si applica a