Compartir a través de


SubscriptionEnumeration Constructor (NSApplication, String)

Creates and initializes an object of the SubscriptionEnumeration class. The set of subscriptions returned is all subscriptions associated with a particular application and subscription class, regardless of subscriber.

Espacio de nombres: Microsoft.SqlServer.NotificationServices
Ensamblado: Microsoft.SqlServer.NotificationServices (in microsoft.sqlserver.notificationservices.dll)

Sintaxis

'Declaración
Public Sub New ( _
    nsApplication As NSApplication, _
    subscriptionClassName As String _
)
public SubscriptionEnumeration (
    NSApplication nsApplication,
    string subscriptionClassName
)
public:
SubscriptionEnumeration (
    NSApplication^ nsApplication, 
    String^ subscriptionClassName
)
public SubscriptionEnumeration (
    NSApplication nsApplication, 
    String subscriptionClassName
)
public function SubscriptionEnumeration (
    nsApplication : NSApplication, 
    subscriptionClassName : String
)

Parámetros

  • nsApplication
    An NSApplication representing the Notification Services application that contains the collection of subscriptions.
  • subscriptionClassName
    A String containing the name of the subscription class.

Ejemplo

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

Dim instanceName As String = "MyInstanceName"
Dim applicationName As String = "MyApplicationName"
Dim subscriptionClassName As String = "MySubscriptionClassName"

'Create an NSInstance object.
Dim myInstance As New NSInstance(instanceName)

'Create an NSApplication object.
Dim myApplication As New NSApplication(myInstance, applicationName)

'Create a SubscriptionEnumeration object.
Dim mySubscriptionEnumeration As _
    New SubscriptionEnumeration(myApplication, _
    subscriptionClassName)
string instanceName = "MyInstanceName";
string applicationName = "MyApplicationName";
string subscriptionClassName = "MySubscriptionClassName";

//Create an NSInstance object.
NSInstance myInstance = new NSInstance(instanceName);

//Create an NSApplication object.
NSApplication myApplication = 
    new NSApplication(myInstance, applicationName);

//Create a SubscriptionEnumeration object.
SubscriptionEnumeration mySubscriptionEnumeration = 
    new SubscriptionEnumeration(myApplication, 
    subscriptionClassName);

Plataformas

Plataformas de desarrollo

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Plataformas de destino

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Vea también

Referencia

SubscriptionEnumeration Class
SubscriptionEnumeration Members
Microsoft.SqlServer.NotificationServices Namespace