NonHostedEventProvider Constructor (Application, String)

Initializes a new instance of the NonHostedEventProvider class with the parent application and a name.

命名空间: Microsoft.SqlServer.Management.Nmo
程序集: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

语法

声明
Public Sub New ( _
    application As Application, _
    name As String _
)
public NonHostedEventProvider (
    Application application,
    string name
)
public:
NonHostedEventProvider (
    Application^ application, 
    String^ name
)
public NonHostedEventProvider (
    Application application, 
    String name
)
public function NonHostedEventProvider (
    application : Application, 
    name : String
)

参数

  • name
    A String, between 1 and 255 characters in length, that specifies the name of the NonHostedEventProvider. The name must be unique within the application.

    You cannot change the name. To rename a non-hosted event provider, remove the non-hosted event provider and then create a new one.

示例

The following examples show how to define a non-hosted event provider and add it to the collection of non-hosted event providers for the 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)

平台

开发平台

有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。

目标平台

有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。

请参阅

参考

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

其他资源

定义非宿主事件提供程序
NonHostedProvider Element (ADF)
ProviderName Element for NonHostedProvider (ADF)