EnumerationOptions コンストラクタ ()とは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > EnumerationOptions コンストラクタ ()の意味・解説 

EnumerationOptions コンストラクタ ()

既定値使用して、EnumerationOptions クラス新しインスタンス初期化します。既定値については、それぞれのプロパティ説明参照してください。これは既定コンストラクタです。

名前空間: System.Management
アセンブリ: System.Management (system.management.dll 内)
構文構文

Dim instance As New EnumerationOptions
public EnumerationOptions ()
public:
EnumerationOptions ()
public EnumerationOptions ()
public function EnumerationOptions ()
使用例使用例

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"]);
    }
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
EnumerationOptions クラス
EnumerationOptions メンバ
System.Management 名前空間

EnumerationOptions コンストラクタ (ManagementNamedValueCollection, TimeSpan, Int32, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean)

さまざまなオプション値の指定許可してクエリまたは列挙使用する EnumerationOptions クラス新しインスタンス初期化します。

名前空間: System.Management
アセンブリ: 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
)

パラメータ

context

プロバイダに渡すことができるプロバイダ固有情報格納しているオプション コンテキスト オブジェクト

timeout

結果列挙するためのタイムアウト値。

blockSize

WMI (Windows Management Instrumentation) から一度取得する項目数

rewindable

結果セット巻き戻すことができる (つまり、複数回の走査許可する) かどうかを示すには trueそれ以外場合false

returnImmediatley

操作をすぐに返すか (半同期)、またはすべての結果得られるまでブロックすることを示すには trueそれ以外場合false

useAmendedQualifiers

返されオブジェクト変更された (ロケール対応) 修飾子格納していることを示すには trueそれ以外場合false

ensureLocatable

返されすべてのオブジェクトパスが有効であることを確認する場合trueそれ以外場合false

prototypeOnly

実際の結果ではなく結果セットプロトタイプ返すには trueそれ以外場合false

directRead

指定したクラスだけのオブジェクト取得するか、派生クラスからもオブジェクト取得するには trueそれ以外場合false

enumerateDeep

サブクラス再帰的列挙使用するには trueそれ以外場合false

使用例使用例

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"]);
    }
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
EnumerationOptions クラス
EnumerationOptions メンバ
System.Management 名前空間

EnumerationOptions コンストラクタ


オーバーロードの一覧オーバーロードの一覧

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

関連項目

EnumerationOptions クラス
EnumerationOptions メンバ
System.Management 名前空間



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「EnumerationOptions コンストラクタ ()」の関連用語

EnumerationOptions コンストラクタ ()のお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



EnumerationOptions コンストラクタ ()のページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS