AndExpression

What it is

AndExpression is used to compare boolean values and return the boolean AND result. When all booleans are true, the value true will be returned.

Compare with the OrExpression 

Code examples

The pure LINQ expression of the AI-Framework looks like this.

return new AndExpression(left, right);


In the model of the AI-Framework, the AndExpression can simply be written with &&. The AI-Framework will then generated the necessary LINQ expressions.

public ReadOnlyBooleanProperty AndExample
{
	get 
	{ 
		return CalculatedBooleanProperty(() => 
			Operation.EditItem.Left && Operation.EditItem.Right); 
	}
}

 

Explanation of the examples

The result of AND of the two boolean properties is returned.

The same is accomplished with Operation.EditItem.Left && Operation.EditItem.Right in the second example.