Edit

Share via


EventLogWatcher Constructors

Definition

Initializes a new instance of the EventLogWatcher class.

Overloads

EventLogWatcher(EventLogQuery)

Initializes a new instance of the EventLogWatcher class by specifying an event query.

EventLogWatcher(String)

Initializes a new instance of the EventLogWatcher class by specifying the name or path to an event log.

EventLogWatcher(EventLogQuery, EventBookmark)

Initializes a new instance of the EventLogWatcher class by specifying an event query and a bookmark that is used as starting position for the query.

EventLogWatcher(EventLogQuery, EventBookmark, Boolean)

Initializes a new instance of the EventLogWatcher class by specifying an event query, a bookmark that is used as starting position for the query, and a Boolean value that determines whether to read the events that already exist in the event log.

EventLogWatcher(EventLogQuery)

Source:
EventLogWatcher.cs
Source:
EventLogWatcher.cs
Source:
EventLogWatcher.cs

Initializes a new instance of the EventLogWatcher class by specifying an event query.

public:
 EventLogWatcher(System::Diagnostics::Eventing::Reader::EventLogQuery ^ eventQuery);
public EventLogWatcher (System.Diagnostics.Eventing.Reader.EventLogQuery eventQuery);
new System.Diagnostics.Eventing.Reader.EventLogWatcher : System.Diagnostics.Eventing.Reader.EventLogQuery -> System.Diagnostics.Eventing.Reader.EventLogWatcher
Public Sub New (eventQuery As EventLogQuery)

Parameters

eventQuery
EventLogQuery

Specifies a query for the event subscription. When an event is logged that matches the criteria expressed in the query, then the EventRecordWritten event is raised.

See also

Applies to

EventLogWatcher(String)

Source:
EventLogWatcher.cs
Source:
EventLogWatcher.cs
Source:
EventLogWatcher.cs

Initializes a new instance of the EventLogWatcher class by specifying the name or path to an event log.

public:
 EventLogWatcher(System::String ^ path);
public EventLogWatcher (string path);
new System.Diagnostics.Eventing.Reader.EventLogWatcher : string -> System.Diagnostics.Eventing.Reader.EventLogWatcher
Public Sub New (path As String)

Parameters

path
String

The path or name of the event log monitor for events. If any event is logged in this event log, then the EventRecordWritten event is raised.

See also

Applies to

EventLogWatcher(EventLogQuery, EventBookmark)

Source:
EventLogWatcher.cs
Source:
EventLogWatcher.cs
Source:
EventLogWatcher.cs

Initializes a new instance of the EventLogWatcher class by specifying an event query and a bookmark that is used as starting position for the query.

public:
 EventLogWatcher(System::Diagnostics::Eventing::Reader::EventLogQuery ^ eventQuery, System::Diagnostics::Eventing::Reader::EventBookmark ^ bookmark);
public EventLogWatcher (System.Diagnostics.Eventing.Reader.EventLogQuery eventQuery, System.Diagnostics.Eventing.Reader.EventBookmark bookmark);
new System.Diagnostics.Eventing.Reader.EventLogWatcher : System.Diagnostics.Eventing.Reader.EventLogQuery * System.Diagnostics.Eventing.Reader.EventBookmark -> System.Diagnostics.Eventing.Reader.EventLogWatcher
Public Sub New (eventQuery As EventLogQuery, bookmark As EventBookmark)

Parameters

eventQuery
EventLogQuery

Specifies a query for the event subscription. When an event is logged that matches the criteria expressed in the query, then the EventRecordWritten event is raised.

bookmark
EventBookmark

The bookmark (placeholder) used as a starting position in the event log or stream of events. Only events that have been logged after the bookmark event will be returned by the query.

See also

Applies to

EventLogWatcher(EventLogQuery, EventBookmark, Boolean)

Source:
EventLogWatcher.cs
Source:
EventLogWatcher.cs
Source:
EventLogWatcher.cs

Initializes a new instance of the EventLogWatcher class by specifying an event query, a bookmark that is used as starting position for the query, and a Boolean value that determines whether to read the events that already exist in the event log.

public:
 EventLogWatcher(System::Diagnostics::Eventing::Reader::EventLogQuery ^ eventQuery, System::Diagnostics::Eventing::Reader::EventBookmark ^ bookmark, bool readExistingEvents);
public EventLogWatcher (System.Diagnostics.Eventing.Reader.EventLogQuery eventQuery, System.Diagnostics.Eventing.Reader.EventBookmark bookmark, bool readExistingEvents);
new System.Diagnostics.Eventing.Reader.EventLogWatcher : System.Diagnostics.Eventing.Reader.EventLogQuery * System.Diagnostics.Eventing.Reader.EventBookmark * bool -> System.Diagnostics.Eventing.Reader.EventLogWatcher
Public Sub New (eventQuery As EventLogQuery, bookmark As EventBookmark, readExistingEvents As Boolean)

Parameters

eventQuery
EventLogQuery

Specifies a query for the event subscription. When an event is logged that matches the criteria expressed in the query, then the EventRecordWritten event is raised.

bookmark
EventBookmark

The bookmark (placeholder) used as a starting position in the event log or stream of events. Only events that have been logged after the bookmark event will be returned by the query.

readExistingEvents
Boolean

A Boolean value that determines whether to read the events that already exist in the event log. If this value is true, then the existing events are read and if this value is false, then the existing events are not read.

See also

Applies to