EventKeywords EventKeywords EventKeywords EventKeywords Enum

定义

定义应用于事件的标准关键字。Defines the standard keywords that apply to events.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class EventKeywords
[System.Flags]
public enum EventKeywords
type EventKeywords = 
Public Enum EventKeywords
继承
EventKeywordsEventKeywordsEventKeywordsEventKeywords
属性

字段

All All All All -1

所有位设为 1,表示每个可能的事件组。All the bits are set to 1, representing every possible group of events.

AuditFailure AuditFailure AuditFailure AuditFailure 4503599627370496

已附加到所有失败的安全审核事件。Attached to all failed security audit events. 仅对安全日志中的事件使用此关键字。Use this keyword only for events in the security log.

AuditSuccess AuditSuccess AuditSuccess AuditSuccess 9007199254740992

已附加到所有成功的安全审核事件。Attached to all successful security audit events. 仅对安全日志中的事件使用此关键字。Use this keyword only for events in the security log.

CorrelationHint CorrelationHint CorrelationHint CorrelationHint 4503599627370496

已附加到传输事件,其中相关的活动 ID(相关 ID)是一个计算值,不能保证其唯一性(即它不是真正的 GUID)。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 EventLogClassic EventLogClassic EventLogClassic 36028797018963968

附加到使用 RaiseEvent 函数引发的事件。Attached to events that are raised by using the RaiseEvent function.

MicrosoftTelemetry MicrosoftTelemetry MicrosoftTelemetry MicrosoftTelemetry 562949953421312

已附加到所有 Microsoft 遥测事件。Attached to all Microsoft telemetry events.

None None None None 0

发布此事件时未对关键字执行任何筛选。No filtering on keywords is performed when the event is published.

Sqm Sqm Sqm Sqm 2251799813685248

已附加到所有服务质量机制 (SQM) 事件。Attached to all Service Quality Mechanism (SQM) events.

WdiContext WdiContext WdiContext WdiContext 562949953421312

已附加到所有 Windows 诊断基础结构 (WDI) 上下文事件。Attached to all Windows Diagnostics Infrastructure (WDI) context events.

WdiDiagnostic WdiDiagnostic WdiDiagnostic WdiDiagnostic 1125899906842624

已附加到所有 Windows 诊断基础结构 (WDI) 诊断事件。Attached to all Windows Diagnostics Infrastructure (WDI) diagnostic events.

示例

下面的示例演示如何使用EventKeywords类重新定义事件的关键字。The following example shows how to use the EventKeywords class to redefine event keywords. 此代码示例是为提供一个更大示例的一部分EventSource类。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;
}
Public Class Keywords
    Public Const Page As EventKeywords = CType(1, EventKeywords)
    Public Const DataBase As EventKeywords = CType(2, EventKeywords)
    Public Const Diagnostic As EventKeywords = CType(4, EventKeywords)
    Public Const Perf As EventKeywords = CType(8, EventKeywords)
End Class 'Keywords

注解

您可以通过将不同的名称分配给标志自定义关键字的含义。You can customize the meaning of a keyword by assigning different names to the flags.

适用于