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。

适用于