IAttachedCollectionService.GetRelationship(Object, String) 方法

定义

给定关系的名称后,将返回, Microsoft.VisualStudio.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

返回 IAttachedRelationship 对应于关系的,如果关系未知,则返回 null。

适用于