Partager via


HostedEventProviderArgument Constructor (HostedEventProvider, String)

Initializes a new instance of the HostedEventProviderArgument class with an HostedEventProvider and a name.

Espace de noms: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Syntaxe

'Déclaration
Public Sub New ( _
    hostedEventProvider As HostedEventProvider, _
    name As String _
)
public HostedEventProviderArgument (
    HostedEventProvider hostedEventProvider,
    string name
)
public:
HostedEventProviderArgument (
    HostedEventProvider^ hostedEventProvider, 
    String^ name
)
public HostedEventProviderArgument (
    HostedEventProvider hostedEventProvider, 
    String name
)
public function HostedEventProviderArgument (
    hostedEventProvider : HostedEventProvider, 
    name : String
)

Paramètres

  • name
    A String, between 1 255 characters in length, that specifies the name of the hosted event provider.

    You cannot change the name. To rename an argument, you must remove it and then add a new argument.

Notes

name must match the name of a required or optional argument for the event provider. For standard event provider arguments, see the Fournisseurs d'événements standard section.

Exemple

The following examples show how to define an event provider argument and add it to the collection of arguments for a hosted event provider:

HostedEventProviderArgument fileArg_Directory = 
    new HostedEventProviderArgument(
    flightEventProvider, "WatchDirectory");
fileArg_Directory.Value = sampleDirectory + @"\Events";
flightEventProvider.HostedEventProviderArguments.Add(
    fileArg_Directory);
Dim fileArg_Directory As HostedEventProviderArgument = _
    New HostedEventProviderArgument(flightEventProvider, _
        "WatchDirectory")
fileArg_Directory.Value = sampleDirectory + "\Events"
flightEventProvider.HostedEventProviderArguments.Add( _
    fileArg_Directory)

Plateformes

Plateformes de développement

Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.

Plateformes cibles

Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.

Voir aussi

Référence

HostedEventProviderArgument Class
HostedEventProviderArgument Members
Microsoft.SqlServer.Management.Nmo Namespace

Autres ressources

Définition de fournisseurs d'événements hébergés
Argument Element for HostedProvider/Arguments (ADF)