Share via


EventClassCollection.Add Method

Adds an EventClass to the EventClassCollection.

Espacio de nombres: Microsoft.SqlServer.Management.Nmo
Ensamblado: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Sintaxis

'Declaración
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
)

Parámetros

  • eventClass
    The EventClass to add to the collection.

Notas

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.

Ejemplo

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

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

Seguridad para subprocesos

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.

Plataformas

Plataformas de desarrollo

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Plataformas de destino

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Vea también

Referencia

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

Otros recursos

Definir clases de eventos
EventClass Element (ADF)