PresentationHelpers.GetChildShapes<T> Method (IShape)

 

Get child shapes that display the specified type of model element.

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

Syntax

public static IEnumerable<IShape<T>> GetChildShapes<T>(
    this IShape shape
)
where T : IElement
public:
generic<typename T>
where T : IElement
[ExtensionAttribute]
static IEnumerable<IShape<T>^>^ GetChildShapes(
    IShape^ shape
)
static member GetChildShapes<'T when 'T : IElement> : 
        shape:IShape -> IEnumerable<IShape<'T>>
<ExtensionAttribute>
Public Shared Function GetChildShapes(Of T As IElement) (
    shape As IShape
) As IEnumerable(Of IShape(Of T))

Parameters

Return Value

Type: System.Collections.Generic.IEnumerable<IShape<T>>

All shapes that display model elements of type T or one of its subtypes.

Type Parameters

  • T
    The types of elements to show. A subtype of IElement.

Remarks

For more information, see:

Examples

IClassDiagram classDiagram;
// Find only the class shapes, omitting interfaces, packages, and so on.
foreach (IClass class in classDiagram.GetChildShapes<IClass>()) { ... }

See Also

PresentationHelpers Class
Microsoft.VisualStudio.ArchitectureTools.Extensibility.Presentation Namespace

Return to top