IAttachedCollectionService.GetRelationship(Object, String) Method

Definition

Given a name for a relationship, returns an Microsoft.VisualStudio.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.

relationshipName
String

The name of the relationship.

Returns

Returns an IAttachedRelationship corresponding to the relationship, or null if the relationship is unknown.

Applies to