Class ConditionBuilder<TTuple>
Supports the Condition in building custom scenarios using true/false propositions.
Inheritance
Namespace: Cuemon
Assembly: Cuemon.Core.dll
Syntax
public class ConditionBuilder<TTuple>
where TTuple : Template
Type Parameters
Name | Description |
---|---|
TTuple | The type of the n-tuple representation of a Template. |
Properties
| Improve this DocConditionResult
Gets the current combined result of Initialize<TTuple, TValue>(TTuple, TValue, Func<TValue, Boolean>), And(Boolean) and Or(Boolean).
Declaration
public bool ConditionResult { get; }
Property Value
Type | Description |
---|---|
System. |
The current combined result of Initialize<TTuple, TValue>(TTuple, TValue, Func<TValue, Boolean>), And(Boolean) and Or(Boolean). |
Methods
| Improve this DocAnd(Boolean)
Performs a a bitwise logical conjunction (AND) operation of Conditionvalue
.
Declaration
public ConditionBuilder<TTuple> And(bool value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value of a condition that can be either |
Returns
Type | Description |
---|---|
Condition |
This instance with the result of Condition |
And<TValue>(TValue, Func<TValue, Boolean>)
Performs a a bitwise logical conjunction (AND) operation of Conditioncondition
.
Declaration
public ConditionBuilder<TTuple> And<TValue>(TValue value, Func<TValue, bool> condition)
Parameters
Type | Name | Description |
---|---|---|
TValue | value | The argument for |
System. |
condition | The delegate that will evaluate |
Returns
Type | Description |
---|---|
Condition |
This instance with the result of Condition |
Type Parameters
Name | Description |
---|---|
TValue | The type of the value for |
Invoke(Action<TTuple>, Action<TTuple>)
Invokes one of two expressions depending on the value of Condition
Declaration
public void Invoke(Action<TTuple> firstExpression, Action<TTuple> secondExpression)
Parameters
Type | Name | Description |
---|---|---|
System. |
firstExpression | The delegate that is invoked when Condition |
System. |
secondExpression | The delegate that is invoked when Condition |
InvokeWhenFalse(Action<TTuple>)
Invokes the expressions when Conditionfalse
.
Declaration
public void InvokeWhenFalse(Action<TTuple> expression)
Parameters
Type | Name | Description |
---|---|---|
System. |
expression | The delegate that is invoked when Condition |
InvokeWhenTrue(Action<TTuple>)
Invokes the expressions when Conditiontrue
.
Declaration
public void InvokeWhenTrue(Action<TTuple> expression)
Parameters
Type | Name | Description |
---|---|---|
System. |
expression | The delegate that is invoked when Condition |
Or(Boolean)
Performs a bitwise logical disjunction (OR) operation of Conditionvalue
.
Declaration
public ConditionBuilder<TTuple> Or(bool value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value of a condition that can be either |
Returns
Type | Description |
---|---|
Condition |
This instance with the result of Condition |
Or<TValue>(TValue, Func<TValue, Boolean>)
Performs a bitwise logical disjunction (OR) operation of Conditionvalue
.
Declaration
public ConditionBuilder<TTuple> Or<TValue>(TValue value, Func<TValue, bool> condition)
Parameters
Type | Name | Description |
---|---|---|
TValue | value | The argument for |
System. |
condition | The delegate that will evaluate |
Returns
Type | Description |
---|---|
Condition |
This instance with the result of Condition |
Type Parameters
Name | Description |
---|---|
TValue | The type of the value for |