Udostępnij za pośrednictwem


Application.NonHostedEventProviders Property

Gets a NonHostedEventProviderCollection object, which contains the set of non-hosted event providers for the Notification Services application.

Namespace: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Syntax

'Declaration
Public ReadOnly Property NonHostedEventProviders As NonHostedEventProviderCollection
public NonHostedEventProviderCollection NonHostedEventProviders { get; }
public:
property NonHostedEventProviderCollection^ NonHostedEventProviders {
    NonHostedEventProviderCollection^ get ();
}
/** @property */
public NonHostedEventProviderCollection get_NonHostedEventProviders ()
public function get NonHostedEventProviders () : NonHostedEventProviderCollection

Property Value

A NonHostedEventProviderCollection object.

Remarks

Non-hosted event providers are independent event collection components; they are not run by the Notification Services engine. They are usually independent applications that use the Notification Services API or stored procedure to submit event data to an application. You declare the non-hosted event providers so you can later troubleshoot and track event collection. An application can have zero or more non-hosted event providers. An application can also use hosted event providers.

Use the methods of the NonHostedEventProviderCollection class to add or remove NonHostedEventProvider objects.

Example

The following example shows how to define a non-hosted event provider and add it to an application:

// Define non-hosted event provider
NonHostedEventProvider nhep = 
    new NonHostedEventProvider(myApplication, "MyNonHostedEP");
myApplication.NonHostedEventProviders.Add(nhep);
' Define non-hosted event provider
Dim nhep As NonHostedEventProvider = _
    New NonHostedEventProvider(myApplication, "MyNonHostedEP")
myApplication.NonHostedEventProviders.Add(nhep)

Thread Safety

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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

Application Class
Application Members
Microsoft.SqlServer.Management.Nmo Namespace
Application.HostedEventProviders Property

Other Resources

Defining Event Providers
Developing Non-Hosted Event Providers