Session.AddEvent Method (String)
Adds a new Event object to the session from fully qualified event name.
Namespace: Microsoft.SqlServer.Management.XEvent
Assembly: Microsoft.SqlServer.Management.XEvent (in Microsoft.SqlServer.Management.XEvent.dll)
Syntax
'Declaration
Public Function AddEvent ( _
eventName As String _
) As Event
'Usage
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
Parameters
- eventName
Type: System.String
A string value that contains the fully qualified name of the event.
Return Value
Type: Microsoft.SqlServer.Management.XEvent.Event
The newly created Event object.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Parameter eventName is null |
XEventException | Event name is malformed or wrong. |