System.Diagnostics.Tracing.EventSource Class

Provides the ability to create events for event tracing for Windows (ETW).

See Also: EventSource Members


public class EventSource : IDisposable


This class is intended to be inherited by a user class that provides specific events to be used for ETW. The erload:System.Diagnostics.Tracing.EventSource.WriteEvent methods are called to log the events.

The basic functionality of System.Diagnostics.Tracing.EventSource is sufficient for most applications. If you want more control over the ETW manifest that is created, you can apply the System.Diagnostics.Tracing.EventAttribute attribute to the methods. For advanced event source applications, it is possible to intercept the commands being sent to the derived event source and change the filtering, or to cause actions (such as dumping a data structure) to be performed by the inheritor. An event source can be activated with Windows ETW controllers, such as the Logman tool, immediately. It is also possible to programmatically control and intercept the data dispatcher. The System.Diagnostics.Tracing.EventListener class provides additional functionality.


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