Partager via


EventClassCollection.Add Method

Adds an EventClass to the EventClassCollection.

Espace de noms: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Syntaxe

'Déclaration
Public Sub Add ( _
    eventClass As EventClass _
)
public void Add (
    EventClass eventClass
)
public:
void Add (
    EventClass^ eventClass
)
public void Add (
    EventClass eventClass
)
public function Add (
    eventClass : EventClass
)

Paramètres

  • eventClass
    The EventClass to add to the collection.

Notes

Each event class must have a unique name within the application.

If you add event classes to an application after deploying the application, you must Update the instance to apply the changes.

Exemple

The following examples show how to add an event class to an application:

myApplication.EventClasses.Add(flightEvents);
myApplication.EventClasses.Add(flightEvents)

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

EventClassCollection Class
EventClassCollection Members
Microsoft.SqlServer.Management.Nmo Namespace

Autres ressources

Définition des classe d'événements
EventClass Element (ADF)