HostedEventProvider Constructor ()
Initializes a new instance of the HostedEventProvider class.
Namespace: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntax
'Declaration
Public Sub New
public HostedEventProvider ()
public:
HostedEventProvider ()
public HostedEventProvider ()
public function HostedEventProvider ()
Remarks
Updated text:5 December 2005
Updated sample code:5 December 2005
If you use the default constructor, you must immediately set the Name property and then set the Parent property. You can then set other properties.
Because the default constructor does not set property values, you must set the StartTime and Timeout properties.
Example
The following example shows how to use this default constructor. Note that default property values are provided. The assembly name is an empty string because the FileSystemWatcherProvider is a standard (built-in) event provider:
// Define a hosted event provider and set properties.
HostedEventProvider flightEventProvider = new HostedEventProvider();
flightEventProvider.Parent = myApplication;
flightEventProvider.Name = "FlightEP";
flightEventProvider.StartTime = DateTime.MinValue;
flightEventProvider.Timeout = new TimeSpan(0, 5, 0);
flightEventProvider.ClassName = "FileSystemWatcherProvider";
flightEventProvider.AssemblyName = "";
flightEventProvider.SystemName = notificationServicesHost;
' Define a hosted event provider and set properties.
Dim flightEventProvider As HostedEventProvider = _
New HostedEventProvider()
flightEventProvider.Parent = myApplication
flightEventProvider.Name = "FlightEP"
flightEventProvider.StartTime = DateTime.MinValue
flightEventProvider.Timeout = New TimeSpan(0, 5, 0)
flightEventProvider.ClassName = "FileSystemWatcherProvider"
flightEventProvider.AssemblyName = ""
flightEventProvider.SystemName = notificationServicesHost
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
HostedEventProvider Class
HostedEventProvider Members
Microsoft.SqlServer.Management.Nmo Namespace
Other Resources
Defining Hosted Event Providers
HostedProvider Element (ADF)