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

EventRecord

public abstract class EventRecord : IDisposable
Defines the properties of an event instance for an event that is received from an EventLogReader object. The event properties provide information about the event such as the name of the computer where the event was logged and the time the event was created. This class is an abstract class. The EventLogRecord class implements this class.
public abstract Guid? ActivityId { get; }

Gets the globally unique identifier (GUID) for the activity in process for which the event is involved. This allows consumers to group related activities.

public abstract EventBookmark Bookmark { get; }

Gets a placeholder (bookmark) that corresponds to this event. This can be used as a placeholder in a stream of events.

public abstract int Id { get; }

Gets the identifier for this event. All events with this identifier value represent the same type of event.

public abstract long? Keywords { get; }

Gets the keyword mask of the event. Get the value of the KeywordsDisplayNames property to get the name of the keywords used in this mask.

public abstract IEnumerable<string> KeywordsDisplayNames { get; }

Gets the display names of the keywords used in the keyword mask for this event.

public abstract byte? Level { get; }

Gets the level of the event. The level signifies the severity of the event. For the name of the level, get the value of the LevelDisplayName property.

public abstract string LevelDisplayName { get; }

Gets the display name of the level for this event.

public abstract string LogName { get; }

Gets the name of the event log where this event is logged.

public abstract string MachineName { get; }

Gets the name of the computer on which this event was logged.

public abstract short? Opcode { get; }

Gets the opcode of the event. The opcode defines a numeric value that identifies the activity or a point within an activity that the application was performing when it raised the event. For the name of the opcode, get the value of the OpcodeDisplayName property.

public abstract string OpcodeDisplayName { get; }

Gets the display name of the opcode for this event.

public abstract int? ProcessId { get; }

Gets the process identifier for the event provider that logged this event.

public abstract IList<EventProperty> Properties { get; }

Gets the user-supplied properties of the event.

public abstract Guid? ProviderId { get; }

Gets the globally unique identifier (GUID) of the event provider that published this event.

public abstract string ProviderName { get; }

Gets the name of the event provider that published this event.

public abstract int? Qualifiers { get; }

Gets qualifier numbers that are used for event identification.

public abstract long? RecordId { get; }

Gets the event record identifier of the event in the log.

public abstract Guid? RelatedActivityId { get; }

Gets a globally unique identifier (GUID) for a related activity in a process for which an event is involved.

public abstract int? Task { get; }

Gets a task identifier for a portion of an application or a component that publishes an event. A task is a 16-bit value with 16 top values reserved. This type allows any value between 0x0000 and 0xffef to be used. To obtain the task name, get the value of the TaskDisplayName property.

public abstract string TaskDisplayName { get; }

Gets the display name of the task for the event.

public abstract int? ThreadId { get; }

Gets the thread identifier for the thread that the event provider is running in.

public abstract DateTime? TimeCreated { get; }

Gets the time, in DateTime format, that the event was created.

public abstract SecurityIdentifier UserId { get; }

Gets the security descriptor of the user whose context is used to publish the event.

public abstract byte? Version { get; }

Gets the version number for the event.

protected EventRecord()

Initializes a new instance of the EventRecord class.

public void Dispose()

Releases all the resources used by this object.

protected virtual void Dispose(bool disposing)

Releases the unmanaged resources used by this object, and optionally releases the managed resources.

public abstract string FormatDescription()

Gets the event message in the current locale.

public abstract string FormatDescription(IEnumerable<object> values)

Gets the event message, replacing variables in the message with the specified values.

public abstract string ToXml()

Gets the XML representation of the event. All of the event properties are represented in the event XML. The XML conforms to the event schema.