記録の開始時にキャプチャされるイベントを記述するキーワードのコレクションを表します。 プロバイダーが有効になっている場合、ライブラリはその状態情報をログに記録するようプロバイダーに要求します。
Operation 属性を指定した場合、Keyword 要素をコレクションに設定または追加できます。
要素の階層
構文
<CaptureStateOnStart Operation = "Set" | "Add"> | “Remove”
<!-- Child elements -->
Keyword
</CaptureStateOnStart>
属性および要素
属性
属性 |
説明 |
データ型 |
必須 |
Default |
操作 |
キーワードを設定するか、追加するかを示します。 |
この属性は、次のいずれかの値になります。 |
いいえ |
オン |
子要素
親要素
例
次のコード例は、この要素の使用方法を示しています。
<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