次の方法で共有


RelationshipQuery コンストラクター

定義

RelationshipQuery クラスの新しいインスタンスを初期化します。

オーバーロード

RelationshipQuery()

RelationshipQuery クラスの新しいインスタンスを初期化します。 これはパラメーターなしのコンストラクターです。

RelationshipQuery(String)

RelationshipQuery クラスの新しいインスタンスを初期化します。 指定した文字列を WQL クエリとして正しく解析できる場合は、クエリ文字列と見なされます。解析できない場合は、クエリのソース オブジェクトのパスと見なされます。 この場合、クエリはインスタンス クエリと見なされます。

RelationshipQuery(String, String)

ソース オブジェクトとリレーションシップ クラスを指定して、RelationshipQuery クラスの新しいインスタンスを初期化します。 クエリはインスタンス クエリ (スキーマ クエリに対して) であると見なされます。

RelationshipQuery(Boolean, String, String, String, String)

指定したパラメーターのセットを使用して、スキーマ クエリの RelationshipQuery クラスの新しいインスタンスを初期化します。 このコンストラクターは、スキーマ クエリだけで使用します。最初のパラメーターは true にする必要があります。

RelationshipQuery(String, String, String, String, Boolean)

指定したパラメーターのセットを使用して、RelationshipQuery クラスの新しいインスタンスを初期化します。 クエリはインスタンス クエリ (スキーマ クエリに対して) であると見なされます。

RelationshipQuery()

ソース:
ManagementQuery.cs
ソース:
ManagementQuery.cs
ソース:
ManagementQuery.cs

RelationshipQuery クラスの新しいインスタンスを初期化します。 これはパラメーターなしのコンストラクターです。

public:
 RelationshipQuery();
public RelationshipQuery ();
Public Sub New ()

注釈

.NET Framework のセキュリティ

直前の呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されているコードから使用することはできません。 詳細については、「 部分信頼コードからのライブラリの使用」を参照してください。

適用対象

RelationshipQuery(String)

ソース:
ManagementQuery.cs
ソース:
ManagementQuery.cs
ソース:
ManagementQuery.cs

RelationshipQuery クラスの新しいインスタンスを初期化します。 指定した文字列を WQL クエリとして正しく解析できる場合は、クエリ文字列と見なされます。解析できない場合は、クエリのソース オブジェクトのパスと見なされます。 この場合、クエリはインスタンス クエリと見なされます。

public:
 RelationshipQuery(System::String ^ queryOrSourceObject);
public RelationshipQuery (string queryOrSourceObject);
new System.Management.RelationshipQuery : string -> System.Management.RelationshipQuery
Public Sub New (queryOrSourceObject As String)

パラメーター

queryOrSourceObject
String

このクエリのクエリ文字列またはクラス名。

次の例では、WMI クラスと の間のリレーションシップの種類を RelatedObjectQuery設定します。

using System;
using System.Management;

class Sample
{
    public static void Main(string[] args)
    {
        // Full query string is specified
        // to the constructor
        RelationshipQuery q =
            new RelationshipQuery(
            "references of {Win32_ComputerSystem.Name='mymachine'}");

        // Only the object of interest is
        // specified to the constructor
        RelationshipQuery query =
            new RelationshipQuery("Win32_Service.Name='Alerter'");
    }
}
Imports System.Management


Public Class Sample
    Public Overloads Shared Function _
        Main(ByVal args() As String) As Integer

        ' Full query string is specified
        ' to the constructor
        Dim q As New RelationshipQuery( _
            "references of {Win32_ComputerSystem.Name='mymachine'}")

        ' Only the object of interest is
        ' specified to the constructor
        Dim query As New RelationshipQuery( _
            "Win32_Service.Name='Alerter'")

    End Function
End Class

注釈

.NET Framework のセキュリティ

直前の呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されているコードから使用することはできません。 詳細については、「 部分信頼コードからのライブラリの使用」を参照してください。

適用対象

RelationshipQuery(String, String)

ソース:
ManagementQuery.cs
ソース:
ManagementQuery.cs
ソース:
ManagementQuery.cs

ソース オブジェクトとリレーションシップ クラスを指定して、RelationshipQuery クラスの新しいインスタンスを初期化します。 クエリはインスタンス クエリ (スキーマ クエリに対して) であると見なされます。

public:
 RelationshipQuery(System::String ^ sourceObject, System::String ^ relationshipClass);
public RelationshipQuery (string sourceObject, string relationshipClass);
new System.Management.RelationshipQuery : string * string -> System.Management.RelationshipQuery
Public Sub New (sourceObject As String, relationshipClass As String)

パラメーター

sourceObject
String

このクエリのソース オブジェクトのパス。

relationshipClass
String

クエリを実行するリレーションシップの種類。

注釈

.NET Framework のセキュリティ

直前の呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されているコードから使用することはできません。 詳細については、「 部分信頼コードからのライブラリの使用」を参照してください。

適用対象

RelationshipQuery(Boolean, String, String, String, String)

ソース:
ManagementQuery.cs
ソース:
ManagementQuery.cs
ソース:
ManagementQuery.cs

指定したパラメーターのセットを使用して、スキーマ クエリの RelationshipQuery クラスの新しいインスタンスを初期化します。 このコンストラクターは、スキーマ クエリだけで使用します。最初のパラメーターは true にする必要があります。

public:
 RelationshipQuery(bool isSchemaQuery, System::String ^ sourceObject, System::String ^ relationshipClass, System::String ^ relationshipQualifier, System::String ^ thisRole);
public RelationshipQuery (bool isSchemaQuery, string sourceObject, string relationshipClass, string relationshipQualifier, string thisRole);
new System.Management.RelationshipQuery : bool * string * string * string * string -> System.Management.RelationshipQuery
Public Sub New (isSchemaQuery As Boolean, sourceObject As String, relationshipClass As String, relationshipQualifier As String, thisRole As String)

パラメーター

isSchemaQuery
Boolean

クエリがスキーマ クエリであることを示す場合は true。それ以外の場合は false

sourceObject
String

このクエリのソース クラスのパス。

relationshipClass
String

クエリを実行するリレーションシップの種類。

relationshipQualifier
String

リレーションシップ クラスに必要とされる修飾子。

thisRole
String

ソース クラスのリレーションシップ間での役割。

注釈

.NET Framework のセキュリティ

直前の呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されているコードから使用することはできません。 詳細については、「 部分信頼コードからのライブラリの使用」を参照してください。

適用対象

RelationshipQuery(String, String, String, String, Boolean)

ソース:
ManagementQuery.cs
ソース:
ManagementQuery.cs
ソース:
ManagementQuery.cs

指定したパラメーターのセットを使用して、RelationshipQuery クラスの新しいインスタンスを初期化します。 クエリはインスタンス クエリ (スキーマ クエリに対して) であると見なされます。

public:
 RelationshipQuery(System::String ^ sourceObject, System::String ^ relationshipClass, System::String ^ relationshipQualifier, System::String ^ thisRole, bool classDefinitionsOnly);
public RelationshipQuery (string sourceObject, string relationshipClass, string relationshipQualifier, string thisRole, bool classDefinitionsOnly);
new System.Management.RelationshipQuery : string * string * string * string * bool -> System.Management.RelationshipQuery
Public Sub New (sourceObject As String, relationshipClass As String, relationshipQualifier As String, thisRole As String, classDefinitionsOnly As Boolean)

パラメーター

sourceObject
String

このクエリのソース オブジェクトのパス。

relationshipClass
String

クエリを実行するリレーションシップの種類。

relationshipQualifier
String

リレーションシップ オブジェクトに必要とされる修飾子。

thisRole
String

ソース オブジェクトのリレーションシップ間での役割。

classDefinitionsOnly
Boolean

このメソッドから制御が戻るときに、結果として得られるオブジェクトのクラス定義だけが返されることを示すブール値を格納します。

注釈

.NET Framework のセキュリティ

直前の呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されているコードから使用することはできません。 詳細については、「 部分信頼コードからのライブラリの使用」を参照してください。

適用対象