EventDescriptor Structure
Contains the metadata that defines an event.
Assembly: System.Core (in System.Core.dll)
The EventDescriptor type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Channel | Retrieves the channel value from the event descriptor. |
![]() | EventId | Retrieves the event identifier value from the event descriptor. |
![]() | Keywords | Retrieves the keyword value from the event descriptor. |
![]() | Level | Retrieves the level value from the event descriptor. |
![]() | Opcode | Retrieves the operation code value from the event descriptor. |
![]() | Task | Retrieves the task value from the event descriptor. |
![]() | Version | Retrieves the version value from the event descriptor. |
| Name | Description | |
|---|---|---|
![]() | Equals | Indicates whether this instance and a specified object are equal. (Inherited from ValueType.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Returns the hash code for this instance. (Inherited from ValueType.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns the fully qualified type name of this instance. (Inherited from ValueType.) |
This class represents an event defined in the manifest. After writing your manifest, you use the Message Compiler (MC.exe) to generate a resource file. A byproduct of the process is a header file that contains the event descriptor in C, as shown in the following example.
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR ReadEvent = {0x1, 0x0, 0x10, 0x4, 0x0, 0x0, 0x8000000000000005};
Use the values of the descriptor to create an instance of this class, as shown in the following example. The keyword is an unsigned long value and cannot be cast directly to a long; you must use the unchecked language keyword to allow the assignment.
unchecked
{
readEvent = new EventDescriptor(0x1, 0x0, 0x10, 0x4, 0x0, 0x0, (long)0x8000000000000005);
}
You use the descriptor when calling the EventProvider::WriteEvent or EventProvider::WriteEvent method.
For more information on writing the manifest and using the message compiler, see Developing Event Publishers.
Note |
|---|
The HostProtectionAttribute attribute applied to this type or member has the following Resources property value: MayLeakOnAbort. The HostProtectionAttribute does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser). For more information, see the HostProtectionAttribute class or SQL Server Programming and Host Protection Attributes. |
Windows 7, Windows Vista SP1 or later, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
