Partager via


NotificationClass Constructor ()

Default constructor that creates a new instance of the NotificationClass class.

Espace de noms: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Syntaxe

'Déclaration
Public Sub New
public NotificationClass ()
public:
NotificationClass ()
public NotificationClass ()
public function NotificationClass ()

Notes

Texte mis à jour :5 décembre 2005

Exemple de code mis à jour :5 décembre 2005

If you use the default constructor, you must immediately set the Name property and then set the Parent property. You can then set the other required properties, which are FileGroup, NotificationBatchSize, DigestDelivery, MulticastDelivery, and ExpirationAge. For default values, see the other NotificationClass(Application,String) constructor.

Exemple

The following examples show how to use the default constructor to define a notification class and add it to an application:

// Create a NotificationClass and define required properties
NotificationClass flightNotifications = new NotificationClass();
flightNotifications.Name = "FlightNotifications";
flightNotifications.Parent = myApplication;
flightNotifications.FileGroup = "PRIMARY";
flightNotifications.NotificationBatchSize = 0;
flightNotifications.DigestDelivery = false;
flightNotifications.MulticastDelivery = false;
flightNotifications.ExpirationAge = TimeSpan.Zero;
' Create a NotificationClass and define required properties
Dim flightNotifications As NotificationClass = New NotificationClass()
flightNotifications.Name = "FlightNotifications"
flightNotifications.Parent = myApplication
flightNotifications.FileGroup = "PRIMARY"
flightNotifications.NotificationBatchSize = 0
flightNotifications.DigestDelivery = False
flightNotifications.MulticastDelivery = False
flightNotifications.ExpirationAge = TimeSpan.Zero

Plateformes

Plateformes de développement

Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.

Plateformes cibles

Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.

Voir aussi

Référence

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