ElementWalker Class
Enables various traversals of the model starting from a particular element.
Assembly: Microsoft.VisualStudio.Modeling.Sdk.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.12.0.dll)
Microsoft.VisualStudio.Modeling::ElementWalker
Microsoft.VisualStudio.Modeling::BreadthFirstRolePlayerFirstElementWalker
Microsoft.VisualStudio.Modeling::DepthFirstElementWalker
| Name | Description | |
|---|---|---|
![]() | ElementWalker(IElementVisitor^, IElementVisitorFilter^) | Constructor that takes an ElementVisitor. |
![]() | ElementWalker(IElementVisitor^, IElementVisitorFilter^, Boolean) | Constructor that takes an ElementVisitor. |
| Name | Description | |
|---|---|---|
![]() | BypassDemandLoading | Allows the walker to bypass demand loading while traversing |
![]() | Filter | Get or set the IElementVisitorFilter for use during traversal |
![]() | IncludeLinks | Returns true if the walker will include element links in calls to the visitor function |
![]() | InternalElementList | Get the internal list of elements that will be visited |
![]() | Store | Get the internal list of elements that will be visited |
![]() | Visitor | Get or set the IElementVisitor for use during traversal |
| Name | Description | |
|---|---|---|
![]() | DoTraverse(ModelElement^) | Traverse the model starting at the specified starting element. |
![]() | Equals(Object^) | (Inherited from Object.) |
![]() | Finalize() | (Inherited from Object.) |
![]() | GetHashCode() | (Inherited from Object.) |
![]() | GetType() | (Inherited from Object.) |
![]() | MarkForRemovalFromInternalElementList(ModelElement^) | Mark an element for removal from the InternalElementList. We mark first and remove later at the end so that the indices remain valid. When marking elements as visited, we store an index in the hashtable which tells us the order that the element was visited in. If the elements were put into the InternalElementList in that order, we can find the element easily using the index. If not a linear search will be used to find the element. |
![]() | MarkVisited(ModelElement^) | Mark an element as having been already visited |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() | RemoveMarkedElements() | Removes the elements that are marked for removal. Call this at the end of the traversal so that the indices in alreadyVisited remain valid. |
![]() | Reset() | Reset the visitor so that it can start traversing again. This is necessary to clear out the internal list of previously visited elements. |
![]() | ShouldVisitLinkAgain(ElementLink^, ModelElement^) | True if the link has been visited before the currentElement (one of its roleplayers) was visited. |
![]() | ToString() | (Inherited from Object.) |
![]() | Traverse(ICollection<ModelElement^>^) | Traverse the model starting at the specified starting elements. |
![]() | Traverse(ModelElement^) | Traverse the model starting at the specified starting element. |
![]() | Visited(ModelElement^) | determines if the given element has been visited or not |
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


