ElementClosureWalker Class

Represents a walker that builds closures on model elements.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Modeling.ElementWalker
    Microsoft.VisualStudio.Modeling.BreadthFirstRolePlayerFirstElementWalker
      Microsoft.VisualStudio.Modeling.ElementClosureWalker

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

Syntax

'Declaration
Public NotInheritable Class ElementClosureWalker _
    Inherits BreadthFirstRolePlayerFirstElementWalker
public sealed class ElementClosureWalker : BreadthFirstRolePlayerFirstElementWalker
public ref class ElementClosureWalker sealed : public BreadthFirstRolePlayerFirstElementWalker
[<Sealed>]
type ElementClosureWalker =  
    class
        inherit BreadthFirstRolePlayerFirstElementWalker
    end
public final class ElementClosureWalker extends BreadthFirstRolePlayerFirstElementWalker

The ElementClosureWalker type exposes the following members.

Constructors

  Name Description
Public method ElementClosureWalker(Partition, ClosureType, ICollection<ModelElement>) Constructor that creates an ElementVisitor and calls base. This results in breadth first traversal, pre-Order visitation of the graph with element links.
Public method ElementClosureWalker(Partition, ClosureType, ICollection<ModelElement>, IEnumerable<DomainRoleInfo>) Constructor that creates an ElementVisitor and calls base. This results in breadth first traversal, pre-Order visitation of the graph with element links.
Public method ElementClosureWalker(Partition, ClosureType, ICollection<ModelElement>, IEnumerable<DomainRoleInfo>, IList<DomainRoleInfo>) Constructor that creates an ElementVisitor and calls base. This results in breadth first traversal, pre-Order visitation of the graph with element links.
Public method ElementClosureWalker(Partition, ClosureType, ICollection<ModelElement>, Boolean, IEnumerable<DomainRoleInfo>, Boolean) Constructor that creates an ElementVisitor and calls base. This results in breadth first traversal, pre-Order visitation of the graph with element links.
Public method ElementClosureWalker(Partition, ClosureType, ICollection<ModelElement>, Boolean, IEnumerable<DomainRoleInfo>, IEnumerable<DomainRoleInfo>, IList<ModelElement>) Constructor that creates an ElementVisitor and calls base. This results in breadth first traversal, pre-Order visitation of the graph with element links.
Public method ElementClosureWalker(Partition, ClosureType, ICollection<ModelElement>, Boolean, IEnumerable<DomainRoleInfo>, IList<DomainRoleInfo>, Boolean) Constructor that creates an ElementVisitor and calls base. This results in breadth first traversal, pre-Order visitation of the graph with element links.

Top

Properties

  Name Description
Public property BypassDemandLoading Allows the walker to bypass demand loading while traversing (Inherited from ElementWalker.)
Public property ClosureList Resultant List of elements that form the closure
Public property Context Offer a context object for general use by the closure visitors. Use it to store tag/value pairs while building closures.
Public property Filter Get or set the IElementVisitorFilter for use during traversal (Inherited from ElementWalker.)
Public property IncludeLinks Returns true if the walker will include element links in calls to the visitor function (Inherited from ElementWalker.)
Public property InternalElementList Get the internal list of elements that will be visited (Inherited from ElementWalker.)
Public property Store Get the internal list of elements that will be visited (Inherited from ElementWalker.)
Public property Visitor Get or set the IElementVisitor for use during traversal (Inherited from ElementWalker.)

Top

Methods

  Name Description
Public method DoTraverse Visit the elements defined by the visitor and filter. (Inherited from BreadthFirstRolePlayerFirstElementWalker.)
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MarkForRemovalFromInternalElementList 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.)
Protected method MarkVisited Mark an element as having been already visited (Inherited from ElementWalker.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method 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. (Inherited from ElementWalker.)
Public method Reset 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.)
Protected method ShouldVisitLinkAgain True if the link has been visited before the currentElement (one of its roleplayers) was visited. (Inherited from ElementWalker.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Traverse(ModelElement) Traverse the model starting at the specified starting element. (Inherited from ElementWalker.)
Public method Traverse(ICollection<ModelElement>) Traverse the model starting at the specified starting elements. (Inherited from ElementWalker.)
Public method Visited determines if the given element has been visited or not (Inherited from ElementWalker.)

Top

Thread Safety

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

See Also

Reference

Microsoft.VisualStudio.Modeling Namespace