HostedEventProviderArgument Constructor (HostedEventProvider, String)
Initializes a new instance of the HostedEventProviderArgument class with an HostedEventProvider and a name.
Namespace: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntax
'Declaration
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
)
Parameters
- hostedEventProvider
The HostedEventProvider for the hosted event provider. This parameter sets the Parent property.
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.
Remarks
name must match the name of a required or optional argument for the event provider. For standard event provider arguments, see the Standard Event Providers section.
Example
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)
Platforms
Development Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.
Target Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.
See Also
Reference
HostedEventProviderArgument Class
HostedEventProviderArgument Members
Microsoft.SqlServer.Management.Nmo Namespace
Other Resources
Defining Hosted Event Providers
Argument Element for HostedProvider/Arguments (ADF)