PresentationHelpers.GetChildShapes<T> Method
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
'Declaration
<ExtensionAttribute> _
Public Shared Function GetChildShapes(Of T As IElement) ( _
shape As IShape _
) As IEnumerable(Of IShape(Of T))
public static IEnumerable<IShape<T>> GetChildShapes<T>(
this IShape shape
)
where T : IElement
[ExtensionAttribute]
public:
generic<typename T>
where T : IElement
static IEnumerable<IShape<T>^>^ GetChildShapes(
IShape^ shape
)
static member GetChildShapes :
shape:IShape -> IEnumerable<IShape<'T>> when 'T : IElement
JScript does not support generic types or methods.
Type Parameters
- T
The types of elements to show. A subtype of IElement.
Parameters
shape
Type: Microsoft.VisualStudio.ArchitectureTools.Extensibility.Presentation.IShapeThe parent shape or diagram.
Return Value
Type: System.Collections.Generic.IEnumerable<IShape<T>>
All shapes that display model elements of type T or one of its subtypes.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IShape. 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).
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>()) { ... }
.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.
See Also
Reference
Microsoft.VisualStudio.ArchitectureTools.Extensibility.Presentation Namespace