EventListener.OnEventSourceCreated Method (EventSource)

.NET Framework (current version)

Called for all existing event sources when the event listener is created and when a new event source is attached to the listener.

Namespace:   System.Diagnostics.Tracing
Assembly:  mscorlib (in mscorlib.dll)

protected internal virtual void OnEventSourceCreated(
	EventSource eventSource


Type: System.Diagnostics.Tracing.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.

In a multithreaded environment, it is possible for OnEventWritten callbacks to occur before the OnEventSourceCreated callback.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.5
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Return to top