/// <summary> /// Does a logical negation of the operator. /// </summary> /// <returns>The resulting operator.</returns> public IOperator LogicallyNegate() { if (Operator == ExpressionType.Not) { return(InternalOperator); } InternalOperator = InternalOperator.LogicallyNegate(); return(this); }
/// <summary> /// Optimizes the operator based on the mapping source. /// </summary> /// <param name="mappingSource">The mapping source.</param> /// <returns></returns> public IOperator Optimize(IMappingSource mappingSource) { InternalOperator = InternalOperator.Optimize(mappingSource); if (InternalOperator is null) { return(null !); } return(Operator == ExpressionType.Not ? InternalOperator.LogicallyNegate() : (this)); }
/// <summary> /// Does a logical negation of the operator. /// </summary> /// <returns>The resulting operator.</returns> public IOperator LogicallyNegate() { InternalOperator = InternalOperator?.LogicallyNegate(); return(this); }