Partager via


DslDefinitionModelDeleteClosure Class

Remove closure visitor filter

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Modeling.DslDefinition.DslDefinitionModelDeleteClosureBase
    Microsoft.VisualStudio.Modeling.DslDefinition.DslDefinitionModelDeleteClosure

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

Syntax

'Declaration
<CLSCompliantAttribute(True)> _
Public Class DslDefinitionModelDeleteClosure _
    Inherits DslDefinitionModelDeleteClosureBase _
    Implements IElementVisitorFilter
[CLSCompliantAttribute(true)]
public class DslDefinitionModelDeleteClosure : DslDefinitionModelDeleteClosureBase, 
    IElementVisitorFilter
[CLSCompliantAttribute(true)]
public ref class DslDefinitionModelDeleteClosure : public DslDefinitionModelDeleteClosureBase, 
    IElementVisitorFilter
[<CLSCompliantAttribute(true)>]
type DslDefinitionModelDeleteClosure =  
    class 
        inherit DslDefinitionModelDeleteClosureBase 
        interface IElementVisitorFilter 
    end
public class DslDefinitionModelDeleteClosure extends DslDefinitionModelDeleteClosureBase implements IElementVisitorFilter

The DslDefinitionModelDeleteClosure type exposes the following members.

Constructors

  Name Description
Public method DslDefinitionModelDeleteClosure Constructor

Top

Methods

  Name Description
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 the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ShouldVisitRelationship Called to ask the filter if a particular relationship from a source element should be included in the traversal (Inherited from DslDefinitionModelDeleteClosureBase.)
Public method ShouldVisitRolePlayer This method is called to ask the filter if a particular role player associated with an ElementLink should be Visited during traversal. This overrides the generated ShouldVisitRolePlayer() method, which examines the PropagateDelete attribute on the ElementLink to decide whether to visit the associated role players. In this case the RelationshipPort, the shape drawn as a little square where a relationship is connected to a class, was not deleted with the relationship. The reason is that the link used to connect the RelationshipPort (a shape) to the RoleConnector (also a shape) is a subtype of ElementLink called LinkConnectsToNode. Instances of this link type are used to associate various NodeShapes with LinkShapes and so do not propagate deletes, although in the case of the RelationshipPort it should. The same problem existed for InheritancePort, which like RelationshipPort extends TogglePort. This method is called for every ElementLink visited during a delete. If the link in question is an instance of LinkConnectsToNode and the roleplayer is a TogglePort, then the port shape may not be needed anymore. By checking how many links are left to the target role player this method returns VisitorFilterResult.YES if there is exactly one link to the port, VisitorFilterResult.DoNotCare otherwise. This ensures that when the last link to the node is deleted the port shape is deleted as well. (Overrides DslDefinitionModelDeleteClosureBase.ShouldVisitRolePlayer(ElementWalker, ModelElement, ElementLink, DomainRoleInfo, ModelElement).)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

Class is defined in ..\GeneratedCode\DomainModel.cs, which is generated from the DSL Definition model.

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.DslDefinition Namespace