When an object of a specific type is deleted from the model and you want to do something programmatically, you define a class derived from DeletingRule.
A RuleOnAttribute attribute placed on the class indicates what type of object the rule works on and when the rule should fire.
The rule is called when the object of the specified type is being deleted from the model, whether it is deleted in the UI or programmatically.