EventKeywords Enumeration

.NET Framework 4.6 and 4.5

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
Assemblies:   System.Diagnostics.Tracing (in System.Diagnostics.Tracing.dll)
  mscorlib (in mscorlib.dll)

[FlagsAttribute]
public enum EventKeywords

Member nameDescription
AllAll the bits are set to 1, representing every possible group of events.
AuditFailureAttached to all failed security audit events. Use this keyword only for events in the security log.
AuditSuccessAttached to all successful security audit events. Use this keyword only for events in the security log.
CorrelationHintAttached 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).
EventLogClassicAttached to events that are raised by using the RaiseEvent function.
MicrosoftTelemetryAttached to all Microsoft telemetry events.
NoneNo filtering on keywords is performed when the event is published.
SqmAttached to all Service Quality Mechanism (SQM) events.
WdiContextAttached to all Windows Diagnostics Infrastructure (WDI) context events.
WdiDiagnosticAttached 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;
}

.NET Framework

Supported in: 4.6, 4.5

.NET for Windows Phone apps

Supported in: Windows Phone 8.1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft