IElementDirectory.FindElements Method (Guid, Boolean)

Finds all elements in the directory of a specified type.

Namespace:  Microsoft.VisualStudio.Modeling
Assembly:  Microsoft.VisualStudio.Modeling.Sdk (in Microsoft.VisualStudio.Modeling.Sdk.dll)

Syntax

'Declaration
Function FindElements ( _
    domainClassId As Guid, _
    includeDescendants As Boolean _
) As ReadOnlyCollection(Of ModelElement)
'Usage
Dim instance As IElementDirectory 
Dim domainClassId As Guid 
Dim includeDescendants As Boolean 
Dim returnValue As ReadOnlyCollection(Of ModelElement)

returnValue = instance.FindElements(domainClassId, _
    includeDescendants)
ReadOnlyCollection<ModelElement> FindElements(
    Guid domainClassId,
    bool includeDescendants
)
ReadOnlyCollection<ModelElement^>^ FindElements(
    Guid domainClassId, 
    bool includeDescendants
)
function FindElements(
    domainClassId : Guid, 
    includeDescendants : boolean
) : ReadOnlyCollection<ModelElement>

Parameters

  • domainClassId
    Type: System.Guid

    The ID of the domain class to find.

  • includeDescendants
    Type: System.Boolean

    true to include elements of all domain classes derived from the domain class specified in the domainClassId parameter; otherwise, false.

Return Value

Type: System.Collections.ObjectModel.ReadOnlyCollection<ModelElement>
A read-only collection of the type specified.

Remarks

An empty list is returned if no elements were found.

.NET Framework Security

See Also

Reference

IElementDirectory Interface

IElementDirectory Members

FindElements Overload

Microsoft.VisualStudio.Modeling Namespace