Partager via


UmlExtensions.GetRelatedElements<T> Method

Gets elements related to this element by relationships of the specified type.

Namespace:  Microsoft.VisualStudio.ArchitectureTools.Extensibility.Uml
Assembly:  Microsoft.VisualStudio.ArchitectureTools.Extensibility (in Microsoft.VisualStudio.ArchitectureTools.Extensibility.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function GetRelatedElements(Of T As IRelationship) ( _
    element As IElement _
) As IEnumerable(Of IElement)
public static IEnumerable<IElement> GetRelatedElements<T>(
    this IElement element
)
where T : IRelationship
[ExtensionAttribute]
public:
generic<typename T>
where T : IRelationship 
static IEnumerable<IElement^>^ GetRelatedElements(
    IElement^ element
)
static member GetRelatedElements : 
        element:IElement -> IEnumerable<IElement>  when 'T : IRelationship
JScript does not support generic types or methods.

Type Parameters

  • T
    IRelationship or one of its subtypes.

Parameters

Return Value

Type: System.Collections.Generic.IEnumerable<IElement>

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IElement. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

.NET Framework Security

See Also

Reference

UmlExtensions Class

Microsoft.VisualStudio.ArchitectureTools.Extensibility.Uml Namespace