Class ConditionalExpression
Represents a conditional expression that is set on a ConditionBehavior.Condition property. Contains a list of conditions that gets evaluated in order to return true or false for ICondition.Evaluate().
public class ConditionalExpression : Freezable, ICondition
- Inheritance
-
ConditionalExpression
- Implements
- Inherited Members
- Extension Methods
Constructors
ConditionalExpression()
Initializes a new instance of the ConditionalExpression class.
public ConditionalExpression()
Fields
ConditionsProperty
public static readonly DependencyProperty ConditionsProperty
Field Value
ForwardChainingProperty
public static readonly DependencyProperty ForwardChainingProperty
Field Value
Properties
Conditions
Return the Condition collections.
public ConditionCollection Conditions { get; }
Property Value
ForwardChaining
Gets or sets forward chaining for the conditions. If forward chaining is set to ForwardChaining.And, all conditions must be met. If forward chaining is set to ForwardChaining.Or, only one condition must be met.
public ForwardChaining ForwardChaining { get; set; }
Property Value
Methods
CreateInstanceCore()
When implemented in a derived class, creates a new instance of the Freezable derived class.
protected override Freezable CreateInstanceCore()
Returns
- Freezable
The new instance.
Evaluate()
Goes through the Conditions collection and evalutes each condition based on ForwardChaining property.
public bool Evaluate()
Returns
- bool
Returns true if conditions are met; otherwise, returns false.