Edit

Share via


EventLogReader.Seek Method

Definition

Changes the position in the event stream where the next event that is read will come from.

Overloads

Seek(EventBookmark)

Changes the position in the event stream where the next event that is read will come from by specifying a bookmark event. No events logged before the bookmark event will be retrieved.

Seek(EventBookmark, Int64)

Changes the position in the event stream where the next event that is read will come from by specifying a bookmark event and an offset number of events from the bookmark. No events logged before the bookmark plus the offset will be retrieved.

Seek(SeekOrigin, Int64)

Changes the position in the event stream where the next event that is read will come from by specifying a starting position and an offset from the starting position. No events logged before the starting position plus the offset will be retrieved.

Seek(EventBookmark)

Source:
EventLogReader.cs
Source:
EventLogReader.cs
Source:
EventLogReader.cs

Changes the position in the event stream where the next event that is read will come from by specifying a bookmark event. No events logged before the bookmark event will be retrieved.

public:
 void Seek(System::Diagnostics::Eventing::Reader::EventBookmark ^ bookmark);
public void Seek (System.Diagnostics.Eventing.Reader.EventBookmark bookmark);
member this.Seek : System.Diagnostics.Eventing.Reader.EventBookmark -> unit
Public Sub Seek (bookmark As EventBookmark)

Parameters

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.

Remarks

You can use this function only on result sets from an Admin or Operational channel, or from .evtx log files. This function is not supported on analytic and debug channels, or for ETL files.

See also

Applies to

Seek(EventBookmark, Int64)

Source:
EventLogReader.cs
Source:
EventLogReader.cs
Source:
EventLogReader.cs

Changes the position in the event stream where the next event that is read will come from by specifying a bookmark event and an offset number of events from the bookmark. No events logged before the bookmark plus the offset will be retrieved.

public:
 void Seek(System::Diagnostics::Eventing::Reader::EventBookmark ^ bookmark, long offset);
public void Seek (System.Diagnostics.Eventing.Reader.EventBookmark bookmark, long offset);
[System.Security.SecurityCritical]
public void Seek (System.Diagnostics.Eventing.Reader.EventBookmark bookmark, long offset);
member this.Seek : System.Diagnostics.Eventing.Reader.EventBookmark * int64 -> unit
[<System.Security.SecurityCritical>]
member this.Seek : System.Diagnostics.Eventing.Reader.EventBookmark * int64 -> unit
Public Sub Seek (bookmark As EventBookmark, offset As Long)

Parameters

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.

offset
Int64

The offset number of events to change the position of the bookmark.

Attributes

Remarks

You can use this function only on result sets from an Admin or Operational channel, or from .evtx log files. This function is not supported on analytic and debug channels, or for ETL files.

See also

Applies to

Seek(SeekOrigin, Int64)

Source:
EventLogReader.cs
Source:
EventLogReader.cs
Source:
EventLogReader.cs

Changes the position in the event stream where the next event that is read will come from by specifying a starting position and an offset from the starting position. No events logged before the starting position plus the offset will be retrieved.

public:
 void Seek(System::IO::SeekOrigin origin, long offset);
public void Seek (System.IO.SeekOrigin origin, long offset);
[System.Security.SecurityCritical]
public void Seek (System.IO.SeekOrigin origin, long offset);
member this.Seek : System.IO.SeekOrigin * int64 -> unit
[<System.Security.SecurityCritical>]
member this.Seek : System.IO.SeekOrigin * int64 -> unit
Public Sub Seek (origin As SeekOrigin, offset As Long)

Parameters

origin
SeekOrigin

A value from the SeekOrigin enumeration defines where in the stream of events to start querying for events.

offset
Int64

The offset number of events to add to the origin.

Attributes

Remarks

You can use this function only on result sets from an Admin or Operational channel, or from .evtx log files. This function is not supported on analytic and debug channels, or for ETL files.

See also

Applies to