System.Diagnostics.Eventing.Reader.EventLogWatcher
Allows you to subscribe to incoming events. Each time a desired event is published to an event log, the EventRecordWritten event is raised, and the method that handles this event will be executed.
namespace System.Diagnostics.Eventing.Reader
{
public class EventLogWatcher : IDisposable
{
public bool Enabled { get; set; }
public event EventHandler<EventRecordWrittenEventArgs> EventRecordWritten;
public EventLogWatcher(EventLogQuery eventQuery);
public EventLogWatcher(EventLogQuery eventQuery, EventBookmark bookmark);
public EventLogWatcher(EventLogQuery eventQuery, EventBookmark bookmark, bool readExistingEvents);
public EventLogWatcher(string path);
public void Dispose();
protected virtual void Dispose(bool disposing);
}
}