Partager via


IAttachedCollectionService.GetRelationship Method

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

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.Immutable.12.0 (in Microsoft.VisualStudio.Shell.Immutable.12.0.dll)

Syntax

'Declaration
Function GetRelationship ( _
    item As Object, _
    relationshipName As String _
) As IAttachedRelationship
IAttachedRelationship GetRelationship(
    Object item,
    string relationshipName
)
IAttachedRelationship^ GetRelationship(
    Object^ item, 
    String^ relationshipName
)
abstract GetRelationship : 
        item:Object * 
        relationshipName:string -> IAttachedRelationship
function GetRelationship(
    item : Object, 
    relationshipName : String
) : IAttachedRelationship

Parameters

  • item
    Type: Object

    The item.

  • relationshipName
    Type: String

    The name of the relationship.

Return Value

Type: Microsoft.VisualStudio.Shell.IAttachedRelationship
Returns an IAttachedRelationship corresponding to the relationship, or null if the relationship is unknown.

.NET Framework Security

See Also

Reference

IAttachedCollectionService Interface

Microsoft.VisualStudio.Shell Namespace