EventCollector.Dispose Method
EventCollector オブジェクトを破棄します。
名前空間: Microsoft.SqlServer.NotificationServices
アセンブリ: Microsoft.SqlServer.NotificationServices (microsoft.sqlserver.notificationservices.dll 内)
構文
'宣言
Public Sub Dispose
public void Dispose ()
public:
virtual void Dispose () sealed
public final void Dispose ()
public final function Dispose ()
解説
このメソッドを呼び出すと、EventCollector オブジェクトに割り当てられているすべてのリソースが解放され、オブジェクトは使用できない状態になります。Commit の最後の呼び出し以降に EventCollector に書き込まれたすべてのイベント データが破棄されます。
使用例
Dispose メソッドを使用して EventCollector オブジェクトを破棄する例を次に示します。
これらの例では、Microsoft.SqlServer.NotificationServices 名前空間を使用しています。
Try
'Add event batch processing code here.
Catch e As System.Exception
'Add error handling code here.
Finally
'Dispose of the EventCollector object.
myEventCollector.Dispose()
End Try
try
{
//Add event batch processing code here.
}
catch (System.Exception e)
{
//Add error handling code here.
}
finally
{
//Dispose of the EventCollector object.
myEventCollector.Dispose();
}
スレッド セーフ
この型の public static (Microsoft Visual Basic では共有 ) メンバは、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォーム
開発プラットフォーム
サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。
対象プラットフォーム
サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。
参照
関連項目
EventCollector Class
EventCollector Members
Microsoft.SqlServer.NotificationServices Namespace