Rule Class
Defines a condition with an associated set of actions to perform.
Assembly: System.Workflow.Activities (in System.Workflow.Activities.dll)
| Name | Description | |
|---|---|---|
![]() | Rule() | Initializes a new instance of the Rule class. |
![]() | Rule(String^) | Initializes a new instance of the Rule class using the name of the Rule. |
![]() | Rule(String^, RuleCondition^, IList<RuleAction^>^) | Initializes a new instance of the Rule class using the name of the Rule, the rule condition, and a list of THEN actions. |
![]() | Rule(String^, RuleCondition^, IList<RuleAction^>^, IList<RuleAction^>^) | Initializes a new instance of the Rule class using the name of the Rule, the rule condition, a list of THEN actions, and a list of ELSE actions. |
| Name | Description | |
|---|---|---|
![]() | Active | Gets or sets a value that indicates whether the Rule should be evaluated. |
![]() | Condition | Gets or sets a RuleCondition for the Rule to evaluate. |
![]() | Description | Gets or sets a description of the Rule. |
![]() | ElseActions | Gets a collection of RuleAction classes to perform in the ELSE case. |
![]() | Name | Gets or sets the name of the Rule. |
![]() | Priority | Gets or sets a value that indicates the order in which a Rule should be run. |
![]() | ReevaluationBehavior | Gets or sets a value indicating whether a Rule can be reevaluated. |
![]() | ThenActions | Gets a collection of RuleAction classes to perform in the THEN case. |
| Name | Description | |
|---|---|---|
![]() | Clone() | Creates a deep copy of the current Rule. |
![]() | Equals(Object^) | Determines whether this instance of Rule and the object passed as the parameter have the same value.(Overrides Object::Equals(Object^).) |
![]() | Finalize() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.) |
![]() | GetHashCode() | Returns the hash code for this instance.(Overrides Object::GetHashCode().) |
![]() | GetType() | |
![]() | MemberwiseClone() | |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
A Rule consists of a RuleCondition and one or both ThenActions or ElseActions collections.
The following example shows how to create a named Rule.
private Rule firstRule = new Rule("firstRule");
Available since 3.0
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


