Application.EventClasses Property

Gets a EventClassCollection object, which contains the set of event classes for the Notification Services application.

命名空間: Microsoft.SqlServer.Management.Nmo
組件: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

語法

'宣告
Public ReadOnly Property EventClasses As EventClassCollection
public EventClassCollection EventClasses { get; }
public:
property EventClassCollection^ EventClasses {
    EventClassCollection^ get ();
}
/** @property */
public EventClassCollection get_EventClasses ()
public function get EventClasses () : EventClassCollection

屬性值

A EventClassCollection object.

備註

Event classes define the event tables, views, and rules used to store and maintain event data. Applications can have zero or more event classes. If an application does not have an event class, the notification generation rules query other sources for event data.

Use the methods of the EventClassCollection class to add or remove EventClass objects.

範例

The following examples show how to add an event class to an application using this EventClasses property:

myApplication.EventClasses.Add(flightEvents);
myApplication.EventClasses.Add(flightEvents)

執行緒安全性

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.

平台

開發平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

目標平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

請參閱

參考

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

其他資源

定義事件類別
EventClasses Element (ADF)