Share via


IAttachedCollectionService.GetRelationship(Object, String) Method

Definition

Given a name for a relationship, returns an IAttachedRelationship containing a localizable description of the relationship.

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

Parameters

item
Object

The item for which to get the relationship display information.

relationshipName
String

The known name for the relationship.

Returns

An IAttachedRelationship instance corresponding to the relationship, or null if the relationship is unknown.

Applies to