EventProvider クラス
定義
このクラスは、イベントを書き込むときに使用します。Use this class to write events.
public ref class EventProvider : IDisposable
public class EventProvider : IDisposable
type EventProvider = class
interface IDisposable
Public Class EventProvider
Implements IDisposable
- 継承
-
EventProvider
- 実装
注釈
メソッドとメソッドを使用して記述されたイベントを使用するには、 WriteEvent WriteTransferEvent マニフェストでイベントを定義する必要があります。メソッドを使用して記述されたイベントには、 WriteMessageEvent マニフェストは必要ありません。To consume events written using the WriteEvent and WriteTransferEvent methods, the events must be defined in a manifest; events written using the WriteMessageEvent method do not require a manifest.
イベントには、次のマネージデータ型を含めることができます。Events can contain the following managed data types:
[bool]bool
ブール値Boolean
bytebyte
charchar
decimaldecimal
doubledouble
floatfloat
GuidGuid
INTint
IntPtrIntPtr
longlong
sbytesbyte
shortshort
stringstring
uintuint
UInt64UInt64
マニフェスト内のイベントで型が使用されている場合 Boolean
、 Boolean
マネージコードでデータ型を使用してデータ要素を書き込むことはできません。If an event in your manifest uses the Boolean
in-type, you cannot write the data element using a Boolean
data type in your managed code. Boolean
マニフェスト内の型には4バイトの値が必要です Boolean
が、マネージコードのデータ型は1バイトです。The Boolean
in-type in your manifest expects a 4-byte value, and a Boolean
data type in managed code is 1-byte. 代わりに、データ型を使用して値を書き込む必要があり int
ます。Instead, you must use an int
data type to write the value. 値をログに記録する場合は、 Boolean
マニフェストで UInt8 の型を使用します。If you want to log a Boolean
value, use the UInt8 in-type in your manifest.
コンストラクター
EventProvider(Guid) |
EventProvider クラスの新しいインスタンスを初期化します。Initializes a new instance of the EventProvider class. |
メソッド
Close() |
ETW サブシステムからプロバイダーの登録を解除し、すべてのアンマネージ リソースを解放します。Removes the provider's registration from the ETW subsystem and releases all unmanaged resources. |
CreateActivityId() |
プロバイダーの一意の動作識別子を作成します。Creates a unique activity identifier for the provider. |
Dispose() |
この EventProvider オブジェクトに使用されているリソースを解放します。Releases the resources used by this EventProvider object. |
Dispose(Boolean) |
この EventProvider オブジェクトに使用されているリソースを解放します。Releases the resources used by this EventProvider object. |
Equals(Object) |
指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。Determines whether the specified object is equal to the current object. (継承元 Object) |
Finalize() |
インスタンスがガベージ コレクションによって回収される前にリソースを解放し、内部クリーンアップを実行します。Frees resources and performs internal cleanup before the instance is reclaimed by garbage collection. |
GetHashCode() |
既定のハッシュ関数として機能します。Serves as the default hash function. (継承元 Object) |
GetLastWriteEventError() |
イベントの書き込みエラーに関連した最後のエラーを取得します。Gets the last error associated with an event write failure. |
GetType() |
現在のインスタンスの Type を取得します。Gets the Type of the current instance. (継承元 Object) |
IsEnabled() |
プロバイダーを有効化するときに使用されたレベルやキーワードの値に関係なく、任意のセッションでプロバイダーが有効にされているかどうかを判断します。Determines whether any session enabled the provider, regardless of the level and keyword values used to enable the provider. |
IsEnabled(Byte, Int64) |
なんらかのセッションが、プロバイダーから、指定されたイベントを要求しているかどうかを判断します。Determines whether any session is requesting the specified event from the provider. |
MemberwiseClone() |
現在の Object の簡易コピーを作成します。Creates a shallow copy of the current Object. (継承元 Object) |
SetActivityId(Guid) |
WriteEvent メソッドで使用する現在の動作識別子を設定します。Sets the current activity identifier used by the WriteEvent methods. |
ToString() |
現在のオブジェクトを表す文字列を返します。Returns a string that represents the current object. (継承元 Object) |
WriteEvent(EventDescriptor, Int32, IntPtr) |
イベントを書き込みます。Writes an event. イベント データは、メモリのブロックとして指定します。The event data is specified as a block of memory. |
WriteEvent(EventDescriptor, Object[]) |
イベントを書き込みます。Writes an event. イベント データは、オブジェクトの配列として指定します。The event data is specified as an array of objects. |
WriteEvent(EventDescriptor, String) |
イベントを書き込みます。Writes an event. イベント データは文字列として指定します。The event data is specified as a string. |
WriteMessageEvent(String) |
データとして文字列を保持するイベントを書き込みます。Writes an event that contains a string as its data. |
WriteMessageEvent(String, Byte, Int64) |
レベルおよびキーワード値が、セッションによって要求されたイベントと一致する場合に、データとして文字列を保持するイベントを書き込みます。Writes an event that contains a string as its data if the level and keyword value match the events requested by the session. |
WriteTransferEvent(EventDescriptor, Guid, Int32, IntPtr) |
イベントをエンド ツー エンドのシナリオで追跡している場合に、一連のイベントをリンクさせます。Links events together when tracing events in an end-to-end scenario. イベント データは、メモリのブロックとして指定します。The event data is specified as a block of memory. |
WriteTransferEvent(EventDescriptor, Guid, Object[]) |
イベントをエンド ツー エンドのシナリオで追跡している場合に、一連のイベントをリンクさせます。Links events together when tracing events in an end-to-end scenario. イベント データは、オブジェクトの配列として指定します。The event data is specified as an array of objects. |