Editar

Compartilhar via


RelatedObjectQuery Constructors

Definition

Initializes a new instance of the RelatedObjectQuery class.

Overloads

RelatedObjectQuery()

Initializes a new instance of the RelatedObjectQuery class. This is the parameterless constructor.

RelatedObjectQuery(String)

Initializes a new instance of the RelatedObjectQuery class. If the specified string can be successfully parsed as a WQL query, it is considered to be the query string; otherwise, it is assumed to be the path of the source object for the query. In this case, the query is assumed to be an instance query.

RelatedObjectQuery(String, String)

Initializes a new instance of the RelatedObjectQuery class for the given source object and related class. The query is assumed to be an instance query (as opposed to a schema query).

RelatedObjectQuery(Boolean, String, String, String, String, String, String, String)

Initializes a new instance of the RelatedObjectQuery class for a schema query using the given set of parameters. This constructor is used for schema queries only: the first parameter must be set to true .

RelatedObjectQuery(String, String, String, String, String, String, String, Boolean)

Initializes a new instance of the RelatedObjectQuery class for the given set of parameters. The query is assumed to be an instance query (as opposed to a schema query).

RelatedObjectQuery()

Source:
ManagementQuery.cs
Source:
ManagementQuery.cs
Source:
ManagementQuery.cs

Initializes a new instance of the RelatedObjectQuery class. This is the parameterless constructor.

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

Remarks

.NET Framework Security

Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.

Applies to

RelatedObjectQuery(String)

Source:
ManagementQuery.cs
Source:
ManagementQuery.cs
Source:
ManagementQuery.cs

Initializes a new instance of the RelatedObjectQuery class. If the specified string can be successfully parsed as a WQL query, it is considered to be the query string; otherwise, it is assumed to be the path of the source object for the query. In this case, the query is assumed to be an instance query.

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

Parameters

queryOrSourceObject
String

The query string or the path of the source object.

Remarks

.NET Framework Security

Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.

Applies to

RelatedObjectQuery(String, String)

Source:
ManagementQuery.cs
Source:
ManagementQuery.cs
Source:
ManagementQuery.cs

Initializes a new instance of the RelatedObjectQuery class for the given source object and related class. The query is assumed to be an instance query (as opposed to a schema query).

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

Parameters

sourceObject
String

The path of the source object for this query.

relatedClass
String

The related objects' class.

Remarks

.NET Framework Security

Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.

Applies to

RelatedObjectQuery(Boolean, String, String, String, String, String, String, String)

Source:
ManagementQuery.cs
Source:
ManagementQuery.cs
Source:
ManagementQuery.cs

Initializes a new instance of the RelatedObjectQuery class for a schema query using the given set of parameters. This constructor is used for schema queries only: the first parameter must be set to true .

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

Parameters

isSchemaQuery
Boolean

true to indicate that this is a schema query; otherwise, false .

sourceObject
String

The path of the source class.

relatedClass
String

The related objects' required base class.

relationshipClass
String

The relationship type.

relatedQualifier
String

The qualifier required to be present on the related objects.

relationshipQualifier
String

The qualifier required to be present on the relationships.

relatedRole
String

The role that the related objects are required to play in the relationship.

thisRole
String

The role that the source class is required to play in the relationship.

Remarks

.NET Framework Security

Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.

Applies to

RelatedObjectQuery(String, String, String, String, String, String, String, Boolean)

Source:
ManagementQuery.cs
Source:
ManagementQuery.cs
Source:
ManagementQuery.cs

Initializes a new instance of the RelatedObjectQuery class for the given set of parameters. The query is assumed to be an instance query (as opposed to a schema query).

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

Parameters

sourceObject
String

The path of the source object.

relatedClass
String

The related objects' required class.

relationshipClass
String

The relationship type.

relatedQualifier
String

The qualifier required to be present on the related objects.

relationshipQualifier
String

The qualifier required to be present on the relationships.

relatedRole
String

The role that the related objects are required to play in the relationship.

thisRole
String

The role that the source object is required to play in the relationship.

classDefinitionsOnly
Boolean

true to return only the class definitions of the related objects; otherwise, false .

Remarks

.NET Framework Security

Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.

Applies to