EventRecord Class

 

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.

Namespace:   System.Diagnostics.Eventing.Reader
Assembly:  System.Core (in System.Core.dll)

System.Object
  System.Diagnostics.Eventing.Reader.EventRecord
    System.Diagnostics.Eventing.Reader.EventLogRecord

[<AbstractClass>]
[<HostProtectionAttribute(SecurityAction.LinkDemand, MayLeakOnAbort = true)>]
type EventRecord = 
    class
        interface IDisposable
    end

NameDescription
System_CAPS_protmethodEventRecord()

Initializes a new instance of the EventRecord class.

NameDescription
System_CAPS_pubpropertyActivityId

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

System_CAPS_pubpropertyBookmark

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

System_CAPS_pubpropertyId

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

System_CAPS_pubpropertyKeywords

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.

System_CAPS_pubpropertyKeywordsDisplayNames

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

System_CAPS_pubpropertyLevel

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.

System_CAPS_pubpropertyLevelDisplayName

Gets the display name of the level for this event.

System_CAPS_pubpropertyLogName

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

System_CAPS_pubpropertyMachineName

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

System_CAPS_pubpropertyOpcode

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.

System_CAPS_pubpropertyOpcodeDisplayName

Gets the display name of the opcode for this event.

System_CAPS_pubpropertyProcessId

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

System_CAPS_pubpropertyProperties

Gets the user-supplied properties of the event.

System_CAPS_pubpropertyProviderId

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

System_CAPS_pubpropertyProviderName

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

System_CAPS_pubpropertyQualifiers

Gets qualifier numbers that are used for event identification.

System_CAPS_pubpropertyRecordId

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

System_CAPS_pubpropertyRelatedActivityId

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

System_CAPS_pubpropertyTask

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.

System_CAPS_pubpropertyTaskDisplayName

Gets the display name of the task for the event.

System_CAPS_pubpropertyThreadId

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

System_CAPS_pubpropertyTimeCreated

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

System_CAPS_pubpropertyUserId

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

System_CAPS_pubpropertyVersion

Gets the version number for the event.

NameDescription
System_CAPS_pubmethodDispose()

Releases all the resources used by this object.

System_CAPS_protmethodDispose(Boolean)

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

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodFormatDescription()

Gets the event message in the current locale.

System_CAPS_pubmethodFormatDescription(IEnumerable<Object>)

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

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_pubmethodToXml()

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.

For example code using this class, see How To: Query for Events or How To: Access and Read Event Information.

.NET Framework
Available since 3.5

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

System.Diagnostics.Eventing.Reader Namespace
Technology Summary for Reading and Managing Event Logs
Event Log Scenarios

Return to top
Show: