EnumerationOptions クラス
アセンブリ: System.Management (system.management.dll 内)


EnumerationOptions コンストラクタを使用して EnumerationOptions 変数を初期化し、WMI クラスおよびそのサブクラスのすべてのインスタンスを取得する例を次に示します。
Imports System Imports System.Management Public Class RemoteConnect Public Overloads Shared Function Main( _ ByVal args() As String) As Integer Dim opt As New EnumerationOptions ' Will enumerate instances of the given class ' and any subclasses. opt.EnumerateDeep = True Dim mngmtClass As New ManagementClass("CIM_Service") Dim o As ManagementObject For Each o In mngmtClass.GetInstances(opt) Console.WriteLine(o("Name")) Next o Return 0 End Function End Class
using System; using System.Management; public class RemoteConnect { public static void Main() { EnumerationOptions opt = new EnumerationOptions(); // Will enumerate instances of the given class // and any subclasses. opt.EnumerateDeep = true; ManagementClass c = new ManagementClass("CIM_Service"); foreach (ManagementObject o in c.GetInstances(opt)) Console.WriteLine(o["Name"]); } }

System.Management.ManagementOptions
System.Management.EnumerationOptions


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


EnumerationOptions コンストラクタ ()
アセンブリ: System.Management (system.management.dll 内)


EnumerationOptions コンストラクタを使用して EnumerationOptions 変数を初期化し、WMI クラスおよびそのサブクラスのすべてのインスタンスを取得する例を次に示します。
Imports System Imports System.Management Public Class RemoteConnect Public Overloads Shared Function Main( _ ByVal args() As String) As Integer Dim opt As New EnumerationOptions ' Will enumerate instances of the given class ' and any subclasses. opt.EnumerateDeep = True Dim mngmtClass As New ManagementClass("CIM_Service") Dim o As ManagementObject For Each o In mngmtClass.GetInstances(opt) Console.WriteLine(o("Name")) Next o Return 0 End Function End Class
using System; using System.Management; public class RemoteConnect { public static void Main() { EnumerationOptions opt = new EnumerationOptions(); // Will enumerate instances of the given class // and any subclasses. opt.EnumerateDeep = true; ManagementClass c = new ManagementClass("CIM_Service"); foreach (ManagementObject o in c.GetInstances(opt)) Console.WriteLine(o["Name"]); } }


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


EnumerationOptions コンストラクタ (ManagementNamedValueCollection, TimeSpan, Int32, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean)
アセンブリ: System.Management (system.management.dll 内)

Public Sub New ( _ context As ManagementNamedValueCollection, _ timeout As TimeSpan, _ blockSize As Integer, _ rewindable As Boolean, _ returnImmediatley As Boolean, _ useAmendedQualifiers As Boolean, _ ensureLocatable As Boolean, _ prototypeOnly As Boolean, _ directRead As Boolean, _ enumerateDeep As Boolean _ )
Dim context As ManagementNamedValueCollection Dim timeout As TimeSpan Dim blockSize As Integer Dim rewindable As Boolean Dim returnImmediatley As Boolean Dim useAmendedQualifiers As Boolean Dim ensureLocatable As Boolean Dim prototypeOnly As Boolean Dim directRead As Boolean Dim enumerateDeep As Boolean Dim instance As New EnumerationOptions(context, timeout, blockSize, rewindable, returnImmediatley, useAmendedQualifiers, ensureLocatable, prototypeOnly, directRead, enumerateDeep)
public EnumerationOptions ( ManagementNamedValueCollection context, TimeSpan timeout, int blockSize, bool rewindable, bool returnImmediatley, bool useAmendedQualifiers, bool ensureLocatable, bool prototypeOnly, bool directRead, bool enumerateDeep )
public: EnumerationOptions ( ManagementNamedValueCollection^ context, TimeSpan timeout, int blockSize, bool rewindable, bool returnImmediatley, bool useAmendedQualifiers, bool ensureLocatable, bool prototypeOnly, bool directRead, bool enumerateDeep )
public EnumerationOptions ( ManagementNamedValueCollection context, TimeSpan timeout, int blockSize, boolean rewindable, boolean returnImmediatley, boolean useAmendedQualifiers, boolean ensureLocatable, boolean prototypeOnly, boolean directRead, boolean enumerateDeep )
public function EnumerationOptions ( context : ManagementNamedValueCollection, timeout : TimeSpan, blockSize : int, rewindable : boolean, returnImmediatley : boolean, useAmendedQualifiers : boolean, ensureLocatable : boolean, prototypeOnly : boolean, directRead : boolean, enumerateDeep : boolean )
- blockSize

EnumerationOptions コンストラクタを使用して EnumerationOptions 変数を初期化し、WMI クラスおよびそのサブクラスのすべてのインスタンスを取得する例を次に示します。
Imports System Imports System.Management Public Class RemoteConnect Public Overloads Shared Function Main( _ ByVal args() As String) As Integer Dim opt As EnumerationOptions Opt = New EnumerationOptions( _ Nothing, System.TimeSpan.MaxValue, _ 1, True, True, False, _ True, False, False, True) Dim mngmtClass As New ManagementClass("CIM_Service") Dim o As ManagementObject For Each o In mngmtClass.GetInstances(opt) Console.WriteLine(o("Name")) Next o Return 0 End Function End Class
using System; using System.Management; public class RemoteConnect { public static void Main() { EnumerationOptions opt = new EnumerationOptions( null, System.TimeSpan.MaxValue, 1, true, true, false, true, false, false, true); ManagementClass c = new ManagementClass("CIM_Service"); foreach (ManagementObject o in c.GetInstances(opt)) Console.WriteLine(o["Name"]); } }


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


EnumerationOptions コンストラクタ

名前 | 説明 |
---|---|
EnumerationOptions () | 既定値を使用して、EnumerationOptions クラスの新しいインスタンスを初期化します。既定値については、それぞれのプロパティの説明を参照してください。これは既定のコンストラクタです。 |
EnumerationOptions (ManagementNamedValueCollection, TimeSpan, Int32, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean) | さまざまなオプション値の指定を許可して、クエリまたは列挙に使用する EnumerationOptions クラスの新しいインスタンスを初期化します。 |

EnumerationOptions プロパティ


EnumerationOptions メソッド

名前 | 説明 | |
---|---|---|
![]() | Clone | オーバーライドされます。 オブジェクトのコピーを返します。 |
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

EnumerationOptions メンバ
クエリと列挙関連のオプション オブジェクト用の基本クラスを用意しています。
EnumerationOptions データ型で公開されるメンバを以下の表に示します。



名前 | 説明 | |
---|---|---|
![]() | Clone | オーバーライドされます。 オブジェクトのコピーを返します。 |
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

- EnumerationOptionsのページへのリンク