Share via


IAttachedCollectionService.GetRelationship(Object, String) 方法

定義

指定關聯性的名稱,傳回包含關聯性可當地語系化描述的 IAttachedRelationship。

public:
 Microsoft::VisualStudio::Shell::IAttachedRelationship ^ GetRelationship(System::Object ^ item, System::String ^ relationshipName);
public:
 Microsoft::VisualStudio::Shell::IAttachedRelationship ^ GetRelationship(Platform::Object ^ item, Platform::String ^ relationshipName);
Microsoft::VisualStudio::Shell::IAttachedRelationship GetRelationship(winrt::Windows::Foundation::IInspectable const & item, std::wstring const & relationshipName);
public Microsoft.VisualStudio.Shell.IAttachedRelationship GetRelationship (object item, string relationshipName);
abstract member GetRelationship : obj * string -> Microsoft.VisualStudio.Shell.IAttachedRelationship
Public Function GetRelationship (item As Object, relationshipName As String) As IAttachedRelationship

參數

item
Object

要取得關聯性顯示信息的專案。

relationshipName
String

關聯性的已知名稱。

傳回

對應至關聯性的 IAttachedRelationship 實例,如果關聯性未知,則為 Null。

適用於