表示關鍵字的集合,描述在錄製開始時要擷取的事件。 程式庫會要求提供者在啟用提供者時記錄其狀態資訊。 如果指定 Operation 屬性,則可以將 Keyword 元素設定或新增至集合。
元素階層
Syntax
<CaptureStateOnStart Operation = "Set" | "Add"> | “Remove”
<!-- Child elements -->
Keyword
</CaptureStateOnStart>
屬性和項目
屬性
| 屬性 |
描述 |
資料類型 |
必要 |
預設 |
|
運算 |
指出是否應該設定或新增關鍵字。 |
此屬性可以有下列其中一個值: |
No |
集合 |
子元素
父項目
範例
下列程式碼範例示範如何使用這個專案。
<EventProvider Id="sample-provider" Name="SampleProvider" NonPagedMemory="true" Level="5">
<Keywords>
<Keyword Value="0x98"/> <!-- Provider is enabled with these keywords throughout tracing session -->
</Keywords>
<CaptureStateOnStart>
<Keyword Value="0xff4"/> <!-- Provider is enabled with these keywords when tracing is started. -->
</CaptureStateOnStart>
<CaptureStateOnSave>
<Keyword Value="0x118"/> <!-- Provider is enabled with these keywords when tracing is saved. -->
</CaptureStateOnSave>
</EventProvider>
元素
CustomKeyword
CaptureStateOnSave