EventLogQuery Constructors

Definition

Initializes a new instance of the EventLogQuery class.

Overloads

EventLogQuery(String, PathType)

Initializes a new instance of the EventLogQuery class by specifying the target of the query. The target can be an active event log or a log file.

EventLogQuery(String, PathType, String)

Initializes a new instance of the EventLogQuery class by specifying the target of the query and the event query. The target can be an active event log or a log file.

EventLogQuery(String, PathType)

Source:
EventLogQuery.cs
Source:
EventLogQuery.cs
Source:
EventLogQuery.cs
Source:
EventLogQuery.cs
Source:
EventLogQuery.cs
Source:
EventLogQuery.cs

Initializes a new instance of the EventLogQuery class by specifying the target of the query. The target can be an active event log or a log file.

C#
public EventLogQuery(string path, System.Diagnostics.Eventing.Reader.PathType pathType);

Parameters

path
String

The name of the event log to query, or the path to the event log file to query.

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.

See also

Applies to

.NET 10 (package-provided) ja muud versioonid
Toode Versioonid
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

EventLogQuery(String, PathType, String)

Source:
EventLogQuery.cs
Source:
EventLogQuery.cs
Source:
EventLogQuery.cs
Source:
EventLogQuery.cs
Source:
EventLogQuery.cs
Source:
EventLogQuery.cs

Initializes a new instance of the EventLogQuery class by specifying the target of the query and the event query. The target can be an active event log or a log file.

C#
public EventLogQuery(string path, System.Diagnostics.Eventing.Reader.PathType pathType, string query);

Parameters

path
String

The name of the event log to query, or the path to the event log file to query.

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.

query
String

The event query used to retrieve events that match the query conditions.

See also

Applies to

.NET 10 (package-provided) ja muud versioonid
Toode Versioonid
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10