private static Expression ConvertToBoolean(Expression expression) { var converted = new BooleanConvertingVisitor().AttemptToConvert(expression); if (converted.Type != typeof(bool)) throw new InvalidOperationException("Could not convert type of " + expression + " to System.Boolean."); return converted; }
private static Expression ConvertToBoolean(Expression expression) { var converted = new BooleanConvertingVisitor().AttemptToConvert(expression); if (converted.Type != typeof(bool)) { throw new InvalidOperationException("Could not convert type of " + expression + " to System.Boolean."); } return(converted); }