Método Session.AddEvent (String)
Adds a new Event object to the session from fully qualified event name.
Namespace: Microsoft.SqlServer.Management.XEvent
Assembly: Microsoft.SqlServer.Management.XEvent (em Microsoft.SqlServer.Management.XEvent.dll)
Sintaxe
'Declaração
Public Function AddEvent ( _
eventName As String _
) As Event
'Uso
Dim instance As Session
Dim eventName As String
Dim returnValue As Event
returnValue = instance.AddEvent(eventName)
public Event AddEvent(
string eventName
)
public:
Event^ AddEvent(
String^ eventName
)
member AddEvent :
eventName:string -> Event
public function AddEvent(
eventName : String
) : Event
Parâmetros
- eventName
Tipo: System.String
A string value that contains the fully qualified name of the event.
Valor de retorno
Tipo: Microsoft.SqlServer.Management.XEvent.Event
The newly created Event object.
Exceções
Exceção | Condição |
---|---|
ArgumentNullException | Parameter eventName is null |
XEventException | Event name is malformed or wrong. |