mscorlib(4.0.0.0) API with additions
System.Diagnostics.EventInstance Class Reference

Represents language-neutral information for an event log entry. More...

Public Member Functions

 EventInstance (long instanceId, int categoryId)
 Initializes a new instance of the T:System.Diagnostics.EventInstance class using the specified resource identifiers for the localized message and category text of the event entry. More...
 
 EventInstance (long instanceId, int categoryId, EventLogEntryType entryType)
 Initializes a new instance of the T:System.Diagnostics.EventInstance class using the specified resource identifiers for the localized message and category text of the event entry and the specified event log entry type. More...
 

Properties

int CategoryId [get, set]
 Gets or sets the resource identifier that specifies the application-defined category of the event entry. More...
 
EventLogEntryType EntryType [get, set]
 Gets or sets the event type of the event log entry. More...
 
long InstanceId [get, set]
 Gets or sets the resource identifier that designates the message text of the event entry. More...
 

Detailed Description

Represents language-neutral information for an event log entry.

Definition at line 6 of file EventInstance.cs.

Constructor & Destructor Documentation

◆ EventInstance() [1/2]

System.Diagnostics.EventInstance.EventInstance ( long  instanceId,
int  categoryId 
)

Initializes a new instance of the T:System.Diagnostics.EventInstance class using the specified resource identifiers for the localized message and category text of the event entry.

Parameters
instanceIdA resource identifier that corresponds to a string defined in the message resource file of the event source.
categoryIdA resource identifier that corresponds to a string defined in the category resource file of the event source, or zero to specify no category for the event.
Exceptions
T:System.ArgumentOutOfRangeExceptionThe instanceId parameter is a negative value or a value larger than F:System.UInt32.MaxValue.-or- The categoryId parameter is a negative value or a value larger than F:System.UInt16.MaxValue.

Definition at line 75 of file EventInstance.cs.

◆ EventInstance() [2/2]

System.Diagnostics.EventInstance.EventInstance ( long  instanceId,
int  categoryId,
EventLogEntryType  entryType 
)

Initializes a new instance of the T:System.Diagnostics.EventInstance class using the specified resource identifiers for the localized message and category text of the event entry and the specified event log entry type.

Parameters
instanceIdA resource identifier that corresponds to a string defined in the message resource file of the event source.
categoryIdA resource identifier that corresponds to a string defined in the category resource file of the event source, or zero to specify no category for the event.
entryTypeAn T:System.Diagnostics.EventLogEntryType value that indicates the event type.
Exceptions
T:System.ComponentModel.InvalidEnumArgumentExceptionentryType is not a valid T:System.Diagnostics.EventLogEntryType value.
T:System.ArgumentOutOfRangeExceptioninstanceId is a negative value or a value larger than F:System.UInt32.MaxValue.-or- categoryId is a negative value or a value larger than F:System.UInt16.MaxValue.

Definition at line 90 of file EventInstance.cs.

Property Documentation

◆ CategoryId

int System.Diagnostics.EventInstance.CategoryId
getset

Gets or sets the resource identifier that specifies the application-defined category of the event entry.

Returns
A numeric category value or resource identifier that corresponds to a string defined in the category resource file of the event source. The default is zero, which signifies that no category will be displayed for the event entry.
Exceptions
T:System.ArgumentOutOfRangeExceptionThe property is set to a negative value or to a value larger than F:System.UInt16.MaxValue.

Definition at line 18 of file EventInstance.cs.

◆ EntryType

EventLogEntryType System.Diagnostics.EventInstance.EntryType
getset

Gets or sets the event type of the event log entry.

Returns
An T:System.Diagnostics.EventLogEntryType value that indicates the event entry type. The default value is F:System.Diagnostics.EventLogEntryType.Information.
Exceptions
T:System.ComponentModel.InvalidEnumArgumentExceptionThe property is not set to a valid T:System.Diagnostics.EventLogEntryType value.

Definition at line 37 of file EventInstance.cs.

◆ InstanceId

long System.Diagnostics.EventInstance.InstanceId
getset

Gets or sets the resource identifier that designates the message text of the event entry.

Returns
A resource identifier that corresponds to a string defined in the message resource file of the event source.
Exceptions
T:System.ArgumentOutOfRangeExceptionThe property is set to a negative value or to a value larger than F:System.UInt32.MaxValue.

Definition at line 56 of file EventInstance.cs.


The documentation for this class was generated from the following file: