次の方法で共有


NotificationClassEnumeration.GetEnumerator Method

IEnumerator インターフェイスを取得します。このインターフェイスを使用して、NotificationClassEnumeration オブジェクトで表される通知クラスのコレクションを繰り返し処理できます。

名前空間: Microsoft.SqlServer.NotificationServices
アセンブリ: Microsoft.SqlServer.NotificationServices (microsoft.sqlserver.notificationservices.dll 内)

構文

'宣言
Public Function GetEnumerator As IEnumerator
public IEnumerator GetEnumerator ()
public:
virtual IEnumerator^ GetEnumerator () sealed
public final IEnumerator GetEnumerator ()
public final function GetEnumerator () : IEnumerator

戻り値

NotificationClassEnumeration オブジェクトの IEnumerator インターフェイスです。

使用例

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

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

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

'Create a NotificationClassEnumeration object.
Dim myNotificationClassEnumeration As _
    New NotificationClassEnumeration(myApplication)

'Iterate through the notification classes.
Dim notificationClass As NotificationClass
For Each notificationClass In myNotificationClassEnumeration
    Console.WriteLine("Notification Class Name: {0}", _
    notificationClass.NotificationClassName)
Next notificationClass
string instanceName = "MyInstanceName";
string applicationName = "MyApplicationName";

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

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

//Create a NotificationClassEnumeration object.
NotificationClassEnumeration myNotificationClassEnumeration = 
    new NotificationClassEnumeration(myApplication);

//Iterate through the notification classes.
foreach (NotificationClass notificationClass 
    in myNotificationClassEnumeration)
{
    Console.WriteLine("Notification Class Name: {0}", 
        notificationClass.NotificationClassName);
} 

スレッド セーフ

この型の public static (Microsoft Visual Basic では共有 ) メンバは、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。

プラットフォーム

開発プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

対象プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

参照

関連項目

NotificationClassEnumeration Class
NotificationClassEnumeration Members
Microsoft.SqlServer.NotificationServices Namespace