EventKeywords Enumeration

.NET Framework (current version)
 

Defines the standard keywords that apply to events.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:   System.Diagnostics.Tracing
Assembly:  mscorlib (in mscorlib.dll)

[FlagsAttribute]
public enum EventKeywords

Member nameDescription
All

All the bits are set to 1, representing every possible group of events.

AuditFailure

Attached to all failed security audit events. Use this keyword only for events in the security log.

AuditSuccess

Attached to all successful security audit events. Use this keyword only for events in the security log.

CorrelationHint

Attached to transfer events where the related activity ID (correlation ID) is a computed value and is not guaranteed to be unique (that is, it is not a real GUID).

EventLogClassic

Attached to events that are raised by using the RaiseEvent function.

MicrosoftTelemetry

Attached to all Microsoft telemetry events.

None

No filtering on keywords is performed when the event is published.

Sqm

Attached to all Service Quality Mechanism (SQM) events.

WdiContext

Attached to all Windows Diagnostics Infrastructure (WDI) context events.

WdiDiagnostic

Attached to all Windows Diagnostics Infrastructure (WDI) diagnostic events.

You can customize the meaning of a keyword by assigning different names to the flags.

The following example shows how to use the EventKeywords class to redefine event keywords. This code example is part of a larger example provided for the EventSource class.

public class Keywords
{
    public const EventKeywords Page = (EventKeywords)1;
    public const EventKeywords DataBase = (EventKeywords)2;
    public const EventKeywords Diagnostic = (EventKeywords)4;
    public const EventKeywords Perf = (EventKeywords)8;
}

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.5
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Return to top
Show: