ManagementObject.GetRelationships Method

Definition

Gets a collection of associations to the object.

Overloads

GetRelationships(String, String, String, Boolean, EnumerationOptions)

Gets a collection of associations to the object.

GetRelationships(ManagementOperationObserver, String)

Gets a collection of associations to the object.

GetRelationships(ManagementOperationObserver, String, String, String, Boolean, EnumerationOptions)

Gets a collection of associations to the object.

GetRelationships(ManagementOperationObserver)

Gets a collection of associations to the object.

GetRelationships()

Gets a collection of associations to the object.

GetRelationships(String)

Gets a collection of associations to the object.

GetRelationships(String, String, String, Boolean, EnumerationOptions)

Source:
ManagementObject.cs
Source:
ManagementObject.cs
Source:
ManagementObject.cs

Gets a collection of associations to the object.

C#
public System.Management.ManagementObjectCollection GetRelationships(string relationshipClass, string relationshipQualifier, string thisRole, bool classDefinitionsOnly, System.Management.EnumerationOptions options);

Parameters

relationshipClass
String

The type of relationship of interest.

relationshipQualifier
String

The qualifier to be present on the relationship.

thisRole
String

The role of this object in the relationship.

classDefinitionsOnly
Boolean

When this method returns, it contains only the class definitions for the result set.

options
EnumerationOptions

The extended options for the query execution.

Returns

A ManagementObjectCollection containing the association objects.

Remarks

This operation is equivalent to a REFERENCES OF query with possibly all the extensions.

.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

.NET 10 (package-provided) a ďalšie verzie
Produkt Verzie
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

GetRelationships(ManagementOperationObserver, String)

Source:
ManagementObject.cs
Source:
ManagementObject.cs
Source:
ManagementObject.cs

Gets a collection of associations to the object.

C#
public void GetRelationships(System.Management.ManagementOperationObserver watcher, string relationshipClass);

Parameters

watcher
ManagementOperationObserver

The object to use to return results.

relationshipClass
String

The associations to include.

Remarks

This operation is equivalent to a REFERENCES OF query where the AssocClass = relationshipClass.

.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

.NET 10 (package-provided) a ďalšie verzie
Produkt Verzie
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

GetRelationships(ManagementOperationObserver, String, String, String, Boolean, EnumerationOptions)

Source:
ManagementObject.cs
Source:
ManagementObject.cs
Source:
ManagementObject.cs

Gets a collection of associations to the object.

C#
public void GetRelationships(System.Management.ManagementOperationObserver watcher, string relationshipClass, string relationshipQualifier, string thisRole, bool classDefinitionsOnly, System.Management.EnumerationOptions options);

Parameters

watcher
ManagementOperationObserver

The object to use to return results.

relationshipClass
String

The type of relationship of interest.

relationshipQualifier
String

The qualifier to be present on the relationship.

thisRole
String

The role of this object in the relationship.

classDefinitionsOnly
Boolean

When this method returns, it contains only the class definitions for the result set.

options
EnumerationOptions

The extended options for the query execution.

Remarks

This operation is equivalent to a REFERENCES OF query with possibly all the extensions.

.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

.NET 10 (package-provided) a ďalšie verzie
Produkt Verzie
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

GetRelationships(ManagementOperationObserver)

Source:
ManagementObject.cs
Source:
ManagementObject.cs
Source:
ManagementObject.cs

Gets a collection of associations to the object.

C#
public void GetRelationships(System.Management.ManagementOperationObserver watcher);

Parameters

watcher
ManagementOperationObserver

The object to use to return results.

Remarks

This operation is equivalent to a REFERENCES OF query.

.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

.NET 10 (package-provided) a ďalšie verzie
Produkt Verzie
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

GetRelationships()

Source:
ManagementObject.cs
Source:
ManagementObject.cs
Source:
ManagementObject.cs

Gets a collection of associations to the object.

C#
public System.Management.ManagementObjectCollection GetRelationships();

Returns

A ManagementObjectCollection containing the association objects.

Remarks

The operation is equivalent to a REFERENCES OF query.

.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

.NET 10 (package-provided) a ďalšie verzie
Produkt Verzie
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

GetRelationships(String)

Source:
ManagementObject.cs
Source:
ManagementObject.cs
Source:
ManagementObject.cs

Gets a collection of associations to the object.

C#
public System.Management.ManagementObjectCollection GetRelationships(string relationshipClass);

Parameters

relationshipClass
String

The associations to include.

Returns

A ManagementObjectCollection containing the association objects.

Remarks

This operation is equivalent to a REFERENCES OF query where the AssocClass = relationshipClass.

.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

.NET 10 (package-provided) a ďalšie verzie
Produkt Verzie
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)