語言

EventKeywords 列舉

定義

定義套用至事件的標準關鍵詞。

此列舉支援其成員值的位元組合。

public enum class EventKeywords
[System.Flags]
public enum EventKeywords
[<System.Flags>]
type EventKeywords = 
Public Enum EventKeywords
繼承
EventKeywords
屬性

欄位

名稱 值 Description
All -1

所有位元都設為 1,代表所有可能的事件群組。

None 0

活動發布時不會對關鍵字進行過濾。

MicrosoftTelemetry 562949953421312

連接所有 Microsoft 遙測事件。

WdiContext 562949953421312

附加於所有 Windows 診斷基礎架構(WDI)情境事件。

WdiDiagnostic 1125899906842624

附加於所有 Windows 診斷基礎設施(WDI)診斷事件。

Sqm 2251799813685248

隸屬於所有服務品質機制(SQM)活動。

AuditFailure 4503599627370496

所有失敗的安全稽核事件都會被綁定。 此關鍵字僅用於安全日誌中的事件。

CorrelationHint 4503599627370496

附加於相關活動 ID(相關 ID)為計算值且不保證唯一(即非真實 GUID)的傳輸事件。

AuditSuccess 9007199254740992

所有成功的安全稽核活動皆可參與。 此關鍵字僅用於安全日誌中的事件。

EventLogClassic 36028797018963968

附加於使用 RaiseEvent 該函數所引發的事件。

範例

以下範例說明如何利用該 EventKeywords 類別重新定義事件關鍵字。 此程式碼範例是 EventSource 類別更大範例的一部分。

public static 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

備註

你可以透過為旗標分配不同名稱來自訂關鍵字的意義。

適用於