ManagementObject.GetRelationships 方法

定義

取得物件的關聯性的集合。Gets a collection of associations to the object.

多載

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)

取得物件的關聯性的集合。Gets a collection of associations to the object.

public:
 System::Management::ManagementObjectCollection ^ GetRelationships(System::String ^ relationshipClass, System::String ^ relationshipQualifier, System::String ^ thisRole, bool classDefinitionsOnly, System::Management::EnumerationOptions ^ options);
public System.Management.ManagementObjectCollection GetRelationships (string relationshipClass, string relationshipQualifier, string thisRole, bool classDefinitionsOnly, System.Management.EnumerationOptions options);
member this.GetRelationships : string * string * string * bool * System.Management.EnumerationOptions -> System.Management.ManagementObjectCollection
Public Function GetRelationships (relationshipClass As String, relationshipQualifier As String, thisRole As String, classDefinitionsOnly As Boolean, options As EnumerationOptions) As ManagementObjectCollection

參數

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.

傳回

ManagementObjectCollection

ManagementObjectCollection,包含關聯的物件。A ManagementObjectCollection containing the association objects.

備註

這項作業相當於查詢 參考 ,可能會有所有延伸模組。This operation is equivalent to a REFERENCES OF query with possibly all the extensions.

.NET Framework 安全性.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.

適用於

GetRelationships(ManagementOperationObserver, String)

取得物件的關聯性的集合。Gets a collection of associations to the object.

public:
 void GetRelationships(System::Management::ManagementOperationObserver ^ watcher, System::String ^ relationshipClass);
public void GetRelationships (System.Management.ManagementOperationObserver watcher, string relationshipClass);
member this.GetRelationships : System.Management.ManagementOperationObserver * string -> unit
Public Sub GetRelationships (watcher As ManagementOperationObserver, relationshipClass As String)

參數

watcher
ManagementOperationObserver

用來傳回結果的物件。The object to use to return results.

relationshipClass
String

要包含的關聯。The associations to include.

備註

這項作業相當於 參考 AssocClass = relationshipClass 的查詢。This operation is equivalent to a REFERENCES OF query where the AssocClass = relationshipClass.

.NET Framework 安全性.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.

適用於

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

取得物件的關聯性的集合。Gets a collection of associations to the object.

public:
 void GetRelationships(System::Management::ManagementOperationObserver ^ watcher, System::String ^ relationshipClass, System::String ^ relationshipQualifier, System::String ^ thisRole, bool classDefinitionsOnly, System::Management::EnumerationOptions ^ options);
public void GetRelationships (System.Management.ManagementOperationObserver watcher, string relationshipClass, string relationshipQualifier, string thisRole, bool classDefinitionsOnly, System.Management.EnumerationOptions options);
member this.GetRelationships : System.Management.ManagementOperationObserver * string * string * string * bool * System.Management.EnumerationOptions -> unit
Public Sub GetRelationships (watcher As ManagementOperationObserver, relationshipClass As String, relationshipQualifier As String, thisRole As String, classDefinitionsOnly As Boolean, options As EnumerationOptions)

參數

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.

備註

這項作業相當於查詢 參考 ,可能會有所有延伸模組。This operation is equivalent to a REFERENCES OF query with possibly all the extensions.

.NET Framework 安全性.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.

適用於

GetRelationships(ManagementOperationObserver)

取得物件的關聯性的集合。Gets a collection of associations to the object.

public:
 void GetRelationships(System::Management::ManagementOperationObserver ^ watcher);
public void GetRelationships (System.Management.ManagementOperationObserver watcher);
member this.GetRelationships : System.Management.ManagementOperationObserver -> unit
Public Sub GetRelationships (watcher As ManagementOperationObserver)

參數

watcher
ManagementOperationObserver

用來傳回結果的物件。The object to use to return results.

備註

這項作業相當於查詢 的參考This operation is equivalent to a REFERENCES OF query.

.NET Framework 安全性.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.

適用於

GetRelationships()

取得物件的關聯性的集合。Gets a collection of associations to the object.

public:
 System::Management::ManagementObjectCollection ^ GetRelationships();
public System.Management.ManagementObjectCollection GetRelationships ();
member this.GetRelationships : unit -> System.Management.ManagementObjectCollection
Public Function GetRelationships () As ManagementObjectCollection

傳回

ManagementObjectCollection

ManagementObjectCollection,包含關聯的物件。A ManagementObjectCollection containing the association objects.

備註

作業相當於查詢 的參考The operation is equivalent to a REFERENCES OF query.

.NET Framework 安全性.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.

適用於

GetRelationships(String)

取得物件的關聯性的集合。Gets a collection of associations to the object.

public:
 System::Management::ManagementObjectCollection ^ GetRelationships(System::String ^ relationshipClass);
public System.Management.ManagementObjectCollection GetRelationships (string relationshipClass);
member this.GetRelationships : string -> System.Management.ManagementObjectCollection
Public Function GetRelationships (relationshipClass As String) As ManagementObjectCollection

參數

relationshipClass
String

要包含的關聯。The associations to include.

傳回

ManagementObjectCollection

ManagementObjectCollection,包含關聯的物件。A ManagementObjectCollection containing the association objects.

備註

這項作業相當於 參考 AssocClass = relationshipClass 的查詢。This operation is equivalent to a REFERENCES OF query where the AssocClass = relationshipClass.

.NET Framework 安全性.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.

適用於