Session.AddTarget Method (TargetInfo)
Adds a new Target object to the session.
Namespace: Microsoft.SqlServer.Management.XEvent
Assembly: Microsoft.SqlServer.Management.XEvent (in Microsoft.SqlServer.Management.XEvent.dll)
Syntax
'Declaration
Public Function AddTarget ( _
targetInfo As TargetInfo _
) As Target
'Usage
Dim instance As Session
Dim targetInfo As TargetInfo
Dim returnValue As Target
returnValue = instance.AddTarget(targetInfo)
public Target AddTarget(
TargetInfo targetInfo
)
public:
Target^ AddTarget(
TargetInfo^ targetInfo
)
member AddTarget :
targetInfo:TargetInfo -> Target
public function AddTarget(
targetInfo : TargetInfo
) : Target
Parameters
- targetInfo
Type: Microsoft.SqlServer.Management.XEvent.TargetInfo
A TargetInfo object.
Return Value
Type: Microsoft.SqlServer.Management.XEvent.Target
The new Target object.