Class ConditionExtensions
- Namespace
- DynaSharp
- Assembly
- DynaSharp.dll
Combines conditions: Attr("a").Eq(1).And(Attr("b").Gt(2)), .Or(...) and .Negate().
public static class ConditionExtensions
- Inheritance
-
ConditionExtensions
- Inherited Members
Methods
And<TLeft, TRight>(TLeft, TRight)
Makes a condition that holds when both hold.
public static And<TLeft, TRight> And<TLeft, TRight>(this TLeft left, TRight right) where TLeft : ICondition where TRight : ICondition
Parameters
leftTLeftThe first condition.
rightTRightThe second condition.
Returns
- And<TLeft, TRight>
The condition.
Type Parameters
TLeftThe type of the first condition.
TRightThe type of the second condition.
Negate<TInner>(TInner)
Makes a condition that holds when another one does not.
public static Not<TInner> Negate<TInner>(this TInner condition) where TInner : ICondition
Parameters
conditionTInnerThe other condition.
Returns
- Not<TInner>
The opposite.
Type Parameters
TInnerThe type of the condition.
Or<TLeft, TRight>(TLeft, TRight)
Makes a condition that holds when either holds.
public static Or<TLeft, TRight> Or<TLeft, TRight>(this TLeft left, TRight right) where TLeft : ICondition where TRight : ICondition
Parameters
leftTLeftThe first condition.
rightTRightThe second condition.
Returns
- Or<TLeft, TRight>
The condition.
Type Parameters
TLeftThe type of the first condition.
TRightThe type of the second condition.