NotificationClass Constructor ()
Default constructor that creates a new instance of the NotificationClass class.
Namespace: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntax
'Declaration
Public Sub New
public NotificationClass ()
public:
NotificationClass ()
public NotificationClass ()
public function NotificationClass ()
Remarks
Updated text:5 December 2005
Updated sample code:5 December 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.
Example
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
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
NotificationClass Class
NotificationClass Members
Microsoft.SqlServer.Management.Nmo Namespace