Share via


Event Constructor (Session, String)

Initializes a new instance of the Event class from the parent Package object and the name of the event.

Namespace:  Microsoft.SqlServer.Management.XEvent
Assembly:  Microsoft.SqlServer.Management.XEvent (in Microsoft.SqlServer.Management.XEvent.dll)

Syntax

'Declaration
Public Sub New ( _
    parent As Session, _
    name As String _
)
'Usage
Dim parent As Session 
Dim name As String 

Dim instance As New Event(parent, _
    name)
public Event(
    Session parent,
    string name
)
public:
Event(
    Session^ parent, 
    String^ name
)
new : 
        parent:Session * 
        name:string -> Event
public function Event(
    parent : Session, 
    name : String
)

Parameters

  • name
    Type: System.String
    The fully qualified name of the event as a string.

Exceptions

Exception Condition
ArgumentNullException

Parameter name is null.

XEventException

The event name is malformed or wrong.

NullReferenceException

The parent of the session is not set yet.

See Also

Reference

Event Class

Event Overload

Microsoft.SqlServer.Management.XEvent Namespace