EventProvider Class
Use this class to write events.
Assembly: System.Core (in System.Core.dll)
| Name | Description | |
|---|---|---|
![]() | EventProvider(Guid) | Initializes a new instance of the EventProvider class. |
| Name | Description | |
|---|---|---|
![]() | Close() | Removes the provider's registration from the ETW subsystem and releases all unmanaged resources. |
![]() ![]() | CreateActivityId() | Creates a unique activity identifier for the provider. |
![]() | Dispose() | Releases the resources used by this EventProvider object. |
![]() | Dispose(Boolean) | Releases the resources used by this EventProvider object. |
![]() | Equals(Object^) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | Finalize() | Frees resources and performs internal cleanup before the instance is reclaimed by garbage collection.(Overrides Object::Finalize().) |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() ![]() | GetLastWriteEventError() | Gets the last error associated with an event write failure. |
![]() | GetType() | |
![]() | IsEnabled() | Determines whether any session enabled the provider, regardless of the level and keyword values used to enable the provider. |
![]() | IsEnabled(Byte, Int64) | Determines whether any session is requesting the specified event from the provider. |
![]() | MemberwiseClone() | |
![]() ![]() | SetActivityId(Guid%) | Sets the current activity identifier used by the WriteEvent methods. |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
![]() | WriteEvent(EventDescriptor%, Int32, IntPtr) | This API supports the product infrastructure and is not intended to be used directly from your code. Writes an event. The event data is specified as a block of memory. |
![]() | WriteEvent(EventDescriptor%, array<Object^>^) | Writes an event. The event data is specified as an array of objects. |
![]() | WriteEvent(EventDescriptor%, String^) | Writes an event. The event data is specified as a string. |
![]() | WriteMessageEvent(String^) | Writes an event that contains a string as its data. |
![]() | WriteMessageEvent(String^, Byte, Int64) | Writes an event that contains a string as its data if the level and keyword value match the events requested by the session. |
![]() | WriteTransferEvent(EventDescriptor%, Guid, Int32, IntPtr) | This API supports the product infrastructure and is not intended to be used directly from your code. Links events together when tracing events in an end-to-end scenario. The event data is specified as a block of memory. |
![]() | WriteTransferEvent(EventDescriptor%, Guid, array<Object^>^) | Links events together when tracing events in an end-to-end scenario. The event data is specified as an array of objects. |
To consume events written using the WriteEvent and WriteTransferEvent methods, the events must be defined in a manifest; events written using the WriteMessageEvent method do not require a manifest.
Events can contain the following managed data types:
bool
Boolean
byte
char
decimal
double
float
Guid
int
IntPtr
long
sbyte
short
string
uint
UInt64
If an event in your manifest uses the Boolean in-type, you cannot write the data element using a Boolean data type in your managed code. The Boolean in-type in your manifest expects a 4-byte value, and a Boolean data type in managed code is 1-byte. Instead, you must use an int data type to write the value. If you want to log a Boolean value, use the UInt8 in-type in your manifest.
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.


