DepthFirstElementWalker Class

 

Enables depth-first traversals of the model starting from a particular element or group of elements. Provides notification of begin and end traversing an element and its descendants.

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


public ref class DepthFirstElementWalker : ElementWalker

NameDescription
System_CAPS_pubmethodDepthFirstElementWalker(IElementVisitor^, IElementVisitorFilter^)

Constructor that takes an ElementVisitor. This defaults to depth first traversal, pre-Order visitation of the graph with no element links.

System_CAPS_pubmethodDepthFirstElementWalker(IElementVisitor^, IElementVisitorFilter^, Boolean)

Constructor that takes an ElementVisitor.

NameDescription
System_CAPS_pubpropertyBypassDemandLoading

Allows the walker to bypass demand loading while traversing(Inherited from ElementWalker.)

System_CAPS_pubpropertyFilter

Get or set the IElementVisitorFilter for use during traversal(Inherited from ElementWalker.)

System_CAPS_pubpropertyIncludeLinks

Returns true if the walker will include element links in calls to the visitor function(Inherited from ElementWalker.)

System_CAPS_pubpropertyInternalElementList

Get the internal list of elements that will be visited(Inherited from ElementWalker.)

System_CAPS_pubpropertyStore

Get the internal list of elements that will be visited(Inherited from ElementWalker.)

System_CAPS_pubpropertyVisitor

Get or set the IElementVisitor for use during traversal(Inherited from ElementWalker.)

NameDescription
System_CAPS_protmethodBeginTraverseElement(ModelElement^)

Virtual method called when the walker is about visit the specified element and its related elements.

System_CAPS_pubmethodDoTraverse(ModelElement^)

Traverse the model starting at the specified starting element.(Overrides ElementWalker::DoTraverse(ModelElement^).)

System_CAPS_protmethodEndTraverseElement(ModelElement^)

Virtual method indicates that the walker has finished traversing into the specified element.

System_CAPS_pubmethodEquals(Object^)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_protmethodGetRelatedElements(ModelElement^)

Get the list of immediately neighboring elements that should be visited, in the order in which they should be visited.

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodMarkForRemovalFromInternalElementList(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.(Inherited from ElementWalker.)

System_CAPS_protmethodMarkVisited(ModelElement^)

Mark an element as having been already visited(Inherited from ElementWalker.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethodRemoveMarkedElements()

Removes the elements that are marked for removal. Call this at the end of the traversal so that the indices in alreadyVisited remain valid.(Inherited from ElementWalker.)

System_CAPS_pubmethodReset()

Reset the visitor so that it can start traversing again. This is necessary to clear out the internal list of previously visited elements.(Inherited from ElementWalker.)

System_CAPS_protmethodShouldVisitLinkAgain(ElementLink^, ModelElement^)

True if the link has been visited before the currentElement (one of its roleplayers) was visited. (Inherited from ElementWalker.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_pubmethodTraverse(ICollection<ModelElement^>^)

Traverse the model starting at the specified starting elements.(Inherited from ElementWalker.)

System_CAPS_pubmethodTraverse(ModelElement^)

Traverse the model starting at the specified starting element.(Inherited from ElementWalker.)

System_CAPS_pubmethodVisited(ModelElement^)

determines if the given element has been visited or not(Inherited from ElementWalker.)

You can inherit from this class to define a walker. Override GetRelatedElements, BeginTraverseElement, and EndTraverseElement.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: