NotificationClass.ExpirationAge Property

Gets or sets the amount of time to elapse before unsent messages of the notification class are considered to have expired.

Пространство имен: Microsoft.SqlServer.Management.Nmo
Сборка: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Синтаксис

'Декларация
Public Property ExpirationAge As TimeSpan
public TimeSpan ExpirationAge { get; set; }
public:
property TimeSpan ExpirationAge {
    TimeSpan get ();
    void set (TimeSpan value);
}
/** @property */
public TimeSpan get_ExpirationAge ()

/** @property */
public void set_ExpirationAge (TimeSpan value)
public function get ExpirationAge () : TimeSpan

public function set ExpirationAge (value : TimeSpan)

Значение свойства

A TimeSpan object that specifies the expiration age for notifications from the notification class.

Замечания

If no ExpirationAge value is specified, notifications never expire. Notification Services continues to attempt delivery of all notifications until the retry schedule is exhausted.

During delivery, Notification Services ignores any notifications that have expired per the ExpirationAge value.

To remove the expiration age value from a deployed application, you must set the value to TimeSpan.Zero.

Пример

The following examples show how to set the expiration age for notifications generated for a notification class:

flightNotifications.ExpirationAge = new TimeSpan(2, 0, 0);
flightNotifications.ExpirationAge = New TimeSpan(2, 0, 0)

Синхронизация потоков

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Платформы

Платформы разработки

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

Целевые платформы

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

См. также

Справочник

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

Другие ресурсы

Определение классов уведомлений
Задание срока действия уведомлений
ExpirationAge Element (ADF)