Compartir a través de


SubscribeToEvents Método (ObjectEventSet, ServerEventHandler)

Specifies the object events to receive.

Espacio de nombres:  Microsoft.SqlServer.Management.Smo
Ensamblado:  Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)

Sintaxis

'Declaración
Public Sub SubscribeToEvents ( _
    events As ObjectEventSet, _
    eventHandler As ServerEventHandler _
)
'Uso
Dim instance As ApplicationRoleEvents
Dim events As ObjectEventSet
Dim eventHandler As ServerEventHandler

instance.SubscribeToEvents(events, eventHandler)
public void SubscribeToEvents(
    ObjectEventSet events,
    ServerEventHandler eventHandler
)
public:
void SubscribeToEvents(
    ObjectEventSet^ events, 
    ServerEventHandler^ eventHandler
)
member SubscribeToEvents : 
        events:ObjectEventSet * 
        eventHandler:ServerEventHandler -> unit 
public function SubscribeToEvents(
    events : ObjectEventSet, 
    eventHandler : ServerEventHandler
)

Parámetros

Comentarios

In case events have been specified that have been selected in an earlier call to this method, this will override the event handler settings for those events.

Using this version of the SubscribeToEvents method, the events are sent to the handler in the second argument.