EventCollector.Dispose Method
Disposes of the EventCollector object.
Espace de noms: Microsoft.SqlServer.NotificationServices
Assembly: Microsoft.SqlServer.NotificationServices (in microsoft.sqlserver.notificationservices.dll)
Syntaxe
'Déclaration
Public Sub Dispose
public void Dispose ()
public:
virtual void Dispose () sealed
public final void Dispose ()
public final function Dispose ()
Notes
Calling this method releases all resources allocated for the EventCollector object, and leaves it unusable. Any event data that has been written to the EventCollector since the last Commit call is discarded.
Exemple
The following examples show how to use the Dispose method to dispose of an EventCollector object.
These examples use the Microsoft.SqlServer.NotificationServices namespace.
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();
}
Sécurité des threads
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Plateformes
Plateformes de développement
Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.
Plateformes cibles
Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.
Voir aussi
Référence
EventCollector Class
EventCollector Members
Microsoft.SqlServer.NotificationServices Namespace