UmlExtensions.GetRelatedElements<T> Method
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Get the elements that are linked to this element through relationships of type T. T can be any relationship type, such as IAssociation or IGeneralization.
Namespace: Microsoft.VisualStudio.Uml.Extensions
Assembly: Microsoft.VisualStudio.Uml.Extensions (in Microsoft.VisualStudio.Uml.Extensions.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function GetRelatedElements(Of T As IRelationship) ( _
element As IElement _
) As IEnumerable(Of IElement)
'Usage
Dim element As IElement
Dim returnValue As IEnumerable(Of IElement)
returnValue = element.GetRelatedElements()
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
Parameters
- element
Type: Microsoft.VisualStudio.Uml.Classes.IElement
element of the links
Return Value
Type: System.Collections.Generic.IEnumerable<IElement>
Collection of IElement at the opposite end of the link
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.