Freigeben über


NonHostedEventProvider Constructor (Application, String)

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

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

Syntax

'Declaration
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
)

Parameter

  • 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.

Beispiel

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)

Plattformen

Entwicklungsplattformen

Eine Liste der unterstützten Plattformen finden Sie unterHardware- und Softwareanforderungen für die Installation von SQL Server 2005.

Zielplattforme

Eine Liste der unterstützten Plattformen finden Sie unterHardware- und Softwareanforderungen für die Installation von SQL Server 2005.

Siehe auch

Verweis

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

Andere Ressourcen

Definieren von nicht gehosteten Ereignisanbietern
NonHostedProvider Element (ADF)
ProviderName Element for NonHostedProvider (ADF)