Compartir a través de


DeleteRule Class

Represents a rule that is called when an object is deleted from the model.

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

Syntax

Public MustInherit Class DeleteRule _
    Inherits Rule

Dim instance As DeleteRule
public abstract class DeleteRule : Rule
public ref class DeleteRule abstract : public Rule
public abstract class DeleteRule extends Rule

Remarks

You define a class derived from DeleteRule when you want to do something programmatically when an object of a specific type is deleted from the model.

A RuleOnAttribute attribute placed on the class indicates what type of object the rule works on and when the rule should fire (inline, local transaction commit, or top level transaction commit).

The rule is called when the object of the specified type is deleted from the model, whether it's deleted in the UI or programmatically.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Modeling.Rule
    Microsoft.VisualStudio.Modeling.DeleteRule
      Microsoft.VisualStudio.Modeling.Diagrams.ParentShapeHasRelativeChildShapesDeleteRule
      Microsoft.VisualStudio.Modeling.Diagrams.ParentShapeContainsNestedChildShapesDeleteRule
      Microsoft.VisualStudio.Modeling.Diagrams.DiagramDeleteRule

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

Concepts

How to: Create Custom Rules

Reference

DeleteRule Members

Microsoft.VisualStudio.Modeling Namespace