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

'Declaration
Public MustInherit Class DeleteRule _
    Inherits Rule
'Usage
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.DiagramDeleteRule
      Microsoft.VisualStudio.Modeling.Diagrams.ParentShapeContainsNestedChildShapesDeleteRule
      Microsoft.VisualStudio.Modeling.Diagrams.ParentShapeHasRelativeChildShapesDeleteRule

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

DeleteRule Members

Microsoft.VisualStudio.Modeling Namespace

Other Resources

How to: Create Custom Rules