RelationshipQuery コンストラクター
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
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()
RelationshipQuery クラスの新しいインスタンスを初期化します。 これはパラメーターなしのコンストラクターです。
public:
RelationshipQuery();
public RelationshipQuery();
Public Sub New ()
注釈
.NET Framework のセキュリティ
直接呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されたコードでは使用できません。 詳細については、「 部分信頼コードからのライブラリの使用」を参照してください。
適用対象
RelationshipQuery(String)
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)
指定したソース オブジェクトとリレーションシップ クラスの 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)
指定したパラメーター セットを使用して、スキーマ クエリの 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)
指定したパラメーター セットに対して、 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 のセキュリティ
直接呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されたコードでは使用できません。 詳細については、「 部分信頼コードからのライブラリの使用」を参照してください。