Compartir a través de


RolePlayerChangeRule Class

Represents a rule that is called when a role player in the model changes.

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

Syntax

Public MustInherit Class RolePlayerChangeRule _
    Inherits Rule

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

Remarks

You define a class derived from RolePlayerChangeRule when you want to do something programmatically when an instance of an object at the source or target side of a link is changed in 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 a role player in the model changes, whether a role player is added or deleted. The rule is called whether the change is done in the UI or programmatically.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Modeling.Rule
    Microsoft.VisualStudio.Modeling.RolePlayerChangeRule
      Microsoft.VisualStudio.Modeling.Diagrams.ParentRoleChangeRule
      Microsoft.VisualStudio.Modeling.Diagrams.NestedShapesParentRoleChangeRule
      Microsoft.VisualStudio.Modeling.Diagrams.BinaryLinkNodeChangeRule

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

RolePlayerChangeRule Members

Microsoft.VisualStudio.Modeling Namespace