System.Diagnostics.Tracing 命名空間

System.Diagnostics.Tracing命名空間提供型別和成員,可讓您建立 Windows (ETW) 之事件追蹤所要擷取的強型別事件。 The System.Diagnostics.Tracing namespace provides types and members that enable you to create strongly typed events to be captured by event tracing for Windows (ETW).

類別

DiagnosticCounter

DiagnosticCounter 是一個抽象類別,作為各種 Counter* 類別的父系類別,即 EventCounterPollingCounterIncrementingEventCounterIncrementingPollingCounterDiagnosticCounter is an abstract class that serves as the parent class for various Counter* classes, namely EventCounter, PollingCounter, IncrementingEventCounter, and IncrementingPollingCounter.

EventAttribute

指定事件的其他事件結構描述資訊。Specifies additional event schema information for an event.

EventCommandEventArgs

提供 OnEventCommand(EventCommandEventArgs) 回呼的引數。Provides the arguments for the OnEventCommand(EventCommandEventArgs) callback.

EventCounter

讓您透過 EventSource 類別收集極度頻繁事件的統計資料。Provides the ability to collect statistics for very frequent events through the EventSource class.

EventDataAttribute

指定要傳遞給 Write<T>(String, EventSourceOptions, T) 方法的類型。Specifies a type to be passed to the Write<T>(String, EventSourceOptions, T) method.

EventFieldAttribute

EventFieldAttribute 位於作為 EventSource 承載傳遞之使用者定義型別的欄位。The EventFieldAttribute is placed on fields of user-defined types that are passed as EventSource payloads.

EventIgnoreAttribute

指定當使用 Write<T>(String, EventSourceOptions, T) 方法寫入事件類型時,應該忽略某個屬性。Specifies a property should be ignored when writing an event type with the Write<T>(String, EventSourceOptions, T) method.

EventListener

提供方法來啟用及停用來自事件來源的事件。Provides methods for enabling and disabling events from event sources.

EventSource

提供建立 Windows 事件追蹤 (ETW) 事件的能力。Provides the ability to create events for event tracing for Windows (ETW).

EventSourceAttribute

可讓 Windows (ETW) 名稱的事件追蹤定義獨立於事件來源類別名稱。Allows the event tracing for Windows (ETW) name to be defined independently of the name of the event source class.

EventSourceCreatedEventArgs

提供 EventSourceCreated 事件的資料。Provides data for the EventSourceCreated event.

EventSourceException

在 Windows (ETW) 事件追蹤期間發生錯誤時,所擲回的例外狀況。The exception that is thrown when an error occurs during event tracing for Windows (ETW).

EventWrittenEventArgs

提供 OnEventWritten(EventWrittenEventArgs) 回呼的資料。Provides data for the OnEventWritten(EventWrittenEventArgs) callback.

IncrementingEventCounter

為不斷增加之變數 (例如執行階段中的例外狀況數) 提供 EventCounter 的變化。Provides a variant of EventCounter for variables that are ever-increasing, such as the number of exceptions in the runtime.

IncrementingPollingCounter

為不斷增加之變數 (例如執行階段中的例外狀況數) 提供 EventCounter 的變化。Provides a variant of EventCounter for variables that are ever-increasing, such as the number of exceptions in the runtime.

NonEventAttribute

識別不產生事件的方法。Identifies a method that is not generating an event.

PollingCounter

提供 EventCounter 的變化,其收集和計算與 EventCounter 相似的統計資料。Provides a variant of EventCounter that collects and calculates similar statistics as EventCounter.

結構

EventSource.EventData

藉由使用 WriteEvent 方法,為快速建立 WriteEventCore(Int32, Int32, EventSource+EventData*) 多載提供事件資料。Provides the event data for creating fast WriteEvent overloads by using the WriteEventCore(Int32, Int32, EventSource+EventData*) method.

EventSourceOptions

呼叫 Write<T>(String, EventSourceOptions, T) 方法時,指定預設事件設定 (例如記錄層級、關鍵字和作業碼) 的覆寫。Specifies overrides of default event settings such as the log level, keywords and operation code when the Write<T>(String, EventSourceOptions, T) method is called.

列舉

EventActivityOptions

指定活動開始和停止事件的追蹤。Specifies the tracking of activity start and stop events.

EventChannel

指定事件的事件記錄檔通道。Specifies the event log channel for the event.

EventCommand

描述傳遞至 Command 回呼的命令 (OnEventCommand(EventCommandEventArgs) 屬性)。Describes the command (Command property) that is passed to the OnEventCommand(EventCommandEventArgs) callback.

EventFieldFormat

指定如何格式化使用者定義類型的值,而且可用來覆寫欄位的預設格式化。Specifies how to format the value of a user-defined type and can be used to override the default formatting for a field.

EventFieldTags

指定使用者定義的標記,其位於藉由 EventFieldAttribute 作為 EventSource 承載傳遞之使用者定義型別的欄位。Specifies the user-defined tag that is placed on fields of user-defined types that are passed as EventSource payloads through the EventFieldAttribute.

EventKeywords

定義套用至事件的標準關鍵字。Defines the standard keywords that apply to events.

EventLevel

識別事件的層級。Identifies the level of an event.

EventManifestOptions

指定如何產生事件來源的 ETW 資訊清單。Specifies how the ETW manifest for the event source is generated.

EventOpcode

定義由事件來源附加至事件的標準作業程式碼。Defines the standard operation codes that the event source attaches to events.

EventSourceSettings

指定事件來源的組態選項。Specifies configuration options for an event source.

EventTags

指定活動開始和停止事件的追蹤。Specifies the tracking of activity start and stop events. 您應該只使用較低的 24 位元。You should only use the lower 24 bits. 如需詳細資訊,請參閱 EventSourceOptionsWrite(String, EventSourceOptions)For more information, see EventSourceOptions and Write(String, EventSourceOptions).

EventTask

定義套用至事件的工作。Defines the tasks that apply to events.

備註

強型別的事件名稱來識別,並包含內容的說明。A strongly typed event is identified by name and contains payload descriptions. 您可以探索程式可藉由使用反映來產生的事件清單。You can discover the list of events that a program can produce by using reflection.