Rule Class

 

Defines a condition with an associated set of actions to perform.

Namespace:   System.Workflow.Activities.Rules
Assembly:  System.Workflow.Activities (in System.Workflow.Activities.dll)

System.Object
  System.Workflow.Activities.Rules.Rule

[SerializableAttribute]
public class Rule

NameDescription
System_CAPS_pubmethodRule()

Initializes a new instance of the Rule class.

System_CAPS_pubmethodRule(String)

Initializes a new instance of the Rule class using the name of the Rule.

System_CAPS_pubmethodRule(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.

System_CAPS_pubmethodRule(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.

NameDescription
System_CAPS_pubpropertyActive

Gets or sets a value that indicates whether the Rule should be evaluated.

System_CAPS_pubpropertyCondition

Gets or sets a RuleCondition for the Rule to evaluate.

System_CAPS_pubpropertyDescription

Gets or sets a description of the Rule.

System_CAPS_pubpropertyElseActions

Gets a collection of RuleAction classes to perform in the ELSE case.

System_CAPS_pubpropertyName

Gets or sets the name of the Rule.

System_CAPS_pubpropertyPriority

Gets or sets a value that indicates the order in which a Rule should be run.

System_CAPS_pubpropertyReevaluationBehavior

Gets or sets a value indicating whether a Rule can be reevaluated.

System_CAPS_pubpropertyThenActions

Gets a collection of RuleAction classes to perform in the THEN case.

NameDescription
System_CAPS_pubmethodClone()

Creates a deep copy of the current Rule.

System_CAPS_pubmethodEquals(Object)

Determines whether this instance of Rule and the object passed as the parameter have the same value.(Overrides Object.Equals(Object).)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Returns the hash code for this instance.(Overrides Object.GetHashCode().)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

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");

.NET Framework
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.

Return to top
Show: