共用方式為


Application.NonHostedEventProviders Property

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

命名空間: Microsoft.SqlServer.Management.Nmo
組件: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

語法

'宣告
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

屬性值

A NonHostedEventProviderCollection object.

備註

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.

範例

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)

執行緒安全性

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.

平台

開發平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

目標平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

請參閱

參考

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

其他資源

定義事件提供者
開發非裝載的事件提供者