<PackageReference Include="System.Diagnostics.EventLog" Version="10.0.5" />

System.Diagnostics.Eventing.Reader.EventLogReader

public class EventLogReader : IDisposable
Enables you to read events from an event log based on an event query. The events that are read by this object are returned as EventRecord objects.
namespace System.Diagnostics.Eventing.Reader { public class EventLogReader : IDisposable { public int BatchSize { get; set; } public IList<EventLogStatus> LogStatus { get; } public EventLogReader(EventLogQuery eventQuery); public EventLogReader(EventLogQuery eventQuery, EventBookmark bookmark); public EventLogReader(string path); public EventLogReader(string path, PathType pathType); public void CancelReading(); public void Dispose(); protected virtual void Dispose(bool disposing); public EventRecord ReadEvent(); public EventRecord ReadEvent(TimeSpan timeout); public void Seek(EventBookmark bookmark); public void Seek(EventBookmark bookmark, long offset); public void Seek(SeekOrigin origin, long offset); } }