EventLogReader Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the EventLogReader class.
Overloads
EventLogReader(EventLogQuery) |
Initializes a new instance of the EventLogReader class by specifying an event query. |
EventLogReader(String) |
Initializes a new instance of the EventLogReader class by specifying an active event log to retrieve events from. |
EventLogReader(EventLogQuery, EventBookmark) |
Initializes a new instance of the EventLogReader class by specifying an event query and a bookmark that is used as starting position for the query. |
EventLogReader(String, PathType) |
Initializes a new instance of the EventLogReader class by specifying the name of an event log to retrieve events from or the path to a log file to retrieve events from. |
EventLogReader(EventLogQuery)
- Source:
- EventLogReader.cs
- Source:
- EventLogReader.cs
- Source:
- EventLogReader.cs
- Source:
- EventLogReader.cs
Initializes a new instance of the EventLogReader class by specifying an event query.
public:
EventLogReader(System::Diagnostics::Eventing::Reader::EventLogQuery ^ eventQuery);
public EventLogReader (System.Diagnostics.Eventing.Reader.EventLogQuery eventQuery);
new System.Diagnostics.Eventing.Reader.EventLogReader : System.Diagnostics.Eventing.Reader.EventLogQuery -> System.Diagnostics.Eventing.Reader.EventLogReader
Public Sub New (eventQuery As EventLogQuery)
Parameters
- eventQuery
- EventLogQuery
The event query used to retrieve events.
Remarks
Use the ReadEvent method to retrieve events from this object.
See also
Applies to
EventLogReader(String)
- Source:
- EventLogReader.cs
- Source:
- EventLogReader.cs
- Source:
- EventLogReader.cs
- Source:
- EventLogReader.cs
Initializes a new instance of the EventLogReader class by specifying an active event log to retrieve events from.
public:
EventLogReader(System::String ^ path);
public EventLogReader (string path);
new System.Diagnostics.Eventing.Reader.EventLogReader : string -> System.Diagnostics.Eventing.Reader.EventLogReader
Public Sub New (path As String)
Parameters
- path
- String
The name of the event log to retrieve events from.
Remarks
Use the ReadEvent method to retrieve events from this object.
See also
Applies to
EventLogReader(EventLogQuery, EventBookmark)
- Source:
- EventLogReader.cs
- Source:
- EventLogReader.cs
- Source:
- EventLogReader.cs
- Source:
- EventLogReader.cs
Initializes a new instance of the EventLogReader class by specifying an event query and a bookmark that is used as starting position for the query.
public:
EventLogReader(System::Diagnostics::Eventing::Reader::EventLogQuery ^ eventQuery, System::Diagnostics::Eventing::Reader::EventBookmark ^ bookmark);
public EventLogReader (System.Diagnostics.Eventing.Reader.EventLogQuery eventQuery, System.Diagnostics.Eventing.Reader.EventBookmark bookmark);
[System.Security.SecurityCritical]
public EventLogReader (System.Diagnostics.Eventing.Reader.EventLogQuery eventQuery, System.Diagnostics.Eventing.Reader.EventBookmark bookmark);
new System.Diagnostics.Eventing.Reader.EventLogReader : System.Diagnostics.Eventing.Reader.EventLogQuery * System.Diagnostics.Eventing.Reader.EventBookmark -> System.Diagnostics.Eventing.Reader.EventLogReader
[<System.Security.SecurityCritical>]
new System.Diagnostics.Eventing.Reader.EventLogReader : System.Diagnostics.Eventing.Reader.EventLogQuery * System.Diagnostics.Eventing.Reader.EventBookmark -> System.Diagnostics.Eventing.Reader.EventLogReader
Public Sub New (eventQuery As EventLogQuery, bookmark As EventBookmark)
Parameters
- eventQuery
- EventLogQuery
The event query used to retrieve events.
- bookmark
- EventBookmark
The bookmark (placeholder) used as a starting position in the event log or stream of events. Only events logged after the bookmark event will be returned by the query.
- Attributes
Remarks
Use the ReadEvent method to retrieve events from this object.
See also
Applies to
EventLogReader(String, PathType)
- Source:
- EventLogReader.cs
- Source:
- EventLogReader.cs
- Source:
- EventLogReader.cs
- Source:
- EventLogReader.cs
Initializes a new instance of the EventLogReader class by specifying the name of an event log to retrieve events from or the path to a log file to retrieve events from.
public:
EventLogReader(System::String ^ path, System::Diagnostics::Eventing::Reader::PathType pathType);
public EventLogReader (string path, System.Diagnostics.Eventing.Reader.PathType pathType);
new System.Diagnostics.Eventing.Reader.EventLogReader : string * System.Diagnostics.Eventing.Reader.PathType -> System.Diagnostics.Eventing.Reader.EventLogReader
Public Sub New (path As String, pathType As PathType)
Parameters
- path
- String
The name of the event log to retrieve events from, or the path to the event log file to retrieve events from.
- pathType
- PathType
Specifies whether the string used in the path parameter specifies the name of an event log, or the path to an event log file.
Remarks
Use the ReadEvent method to retrieve events from this object.
See also
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: Under hela 2024 kommer vi att fasa ut GitHub-problem som feedbackmekanism för innehåll och ersätta det med ett nytt feedbacksystem. Mer information finns i:Skicka och visa feedback för