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 コンストラクタ ()のページへのリンク