Partilhar via


Subscription Constructor (NSApplication, String)

Creates and initializes an object of the Subscription class.

Namespace: Microsoft.SqlServer.NotificationServices
Assembly: Microsoft.SqlServer.NotificationServices (in microsoft.sqlserver.notificationservices.dll)

Syntax

'Declaration
Public Sub New ( _
    nsApplication As NSApplication, _
    subscriptionClassName As String _
)
public Subscription (
    NSApplication nsApplication,
    string subscriptionClassName
)
public:
Subscription (
    NSApplication^ nsApplication, 
    String^ subscriptionClassName
)
public Subscription (
    NSApplication nsApplication, 
    String subscriptionClassName
)
public function Subscription (
    nsApplication : NSApplication, 
    subscriptionClassName : String
)

Parameters

  • nsApplication
    An NSApplication representing the Notification Services application for the subscription.
  • subscriptionClassName
    A String containing the name of the subscription class for the subscription.

Example

The following examples show how to create and initialize a Subscription object in managed code:

' Create the NSInstance object.
Dim testInstance As New NSInstance("Tutorial")
 
' Create the NSApplication object.
Dim testApplication As New NSApplication(testInstance, "Weather")
 
' Create the Subscription object.
Dim testSubscription As _
    New Subscription(testApplication, "WeatherCity")
// Create the NSInstance object.
NSInstance testInstance = new NSInstance("Tutorial");

// Create the NSApplication object.
NSApplication testApplication =
    new NSApplication(testInstance, "Weather");

// Create the Subscription object.
Subscription testSubscription =
    new Subscription(testApplication, "WeatherCity");

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

Subscription Class
Subscription Members
Microsoft.SqlServer.NotificationServices Namespace