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