private static Expression HandleIntersect( EntityQueryModelVisitor entityQueryModelVisitor, IntersectResultOperator intersectResultOperator) => HandleSetOperation( entityQueryModelVisitor, intersectResultOperator.Source2, entityQueryModelVisitor.LinqOperatorProvider.Intersect);
public void GetConstantSource2_NoConstantExpression () { var resultOperator = new IntersectResultOperator (Expression.Parameter (typeof (IEnumerable<string>), "ss")); Assert.That ( () => resultOperator.GetConstantSource2<string>(), Throws.ArgumentException .With.Message.EqualTo ( #if !NET_3_5 "The source2 expression ('ss') is no ConstantExpression, it is a TypedParameterExpression.\r\nParameter name: expression" #else "The source2 expression ('ss') is no ConstantExpression, it is a ParameterExpression.\r\nParameter name: expression" #endif )); }
public void TransformExpressions () { var oldExpression = ExpressionHelper.CreateExpression (); var newExpression = ExpressionHelper.CreateExpression (); var resultOperator = new IntersectResultOperator (oldExpression); resultOperator.TransformExpressions (ex => { Assert.That (ex, Is.SameAs (oldExpression)); return newExpression; }); Assert.That (resultOperator.Source2, Is.SameAs (newExpression)); }
public void TransformExpressions() { var oldExpression = ExpressionHelper.CreateExpression(); var newExpression = ExpressionHelper.CreateExpression(); var resultOperator = new IntersectResultOperator(oldExpression); resultOperator.TransformExpressions(ex => { Assert.That(ex, Is.SameAs(oldExpression)); return(newExpression); }); Assert.That(resultOperator.Source2, Is.SameAs(newExpression)); }
public void GetConstantSource2_NoConstantExpression() { var resultOperator = new IntersectResultOperator(Expression.Parameter(typeof(IEnumerable <string>), "ss")); Assert.That( () => resultOperator.GetConstantSource2 <string>(), Throws.ArgumentException .With.Message.EqualTo( #if !NET_3_5 "The source2 expression ('ss') is no ConstantExpression, it is a TypedParameterExpression.\r\nParameter name: expression" #else "The source2 expression ('ss') is no ConstantExpression, it is a ParameterExpression.\r\nParameter name: expression" #endif )); }
public void SetUp () { _source2 = Expression.Constant (new[] { 2 }); _resultOperator = new IntersectResultOperator (_source2); }
public void SetUp() { _source2 = Expression.Constant(new[] { 2 }); _resultOperator = new IntersectResultOperator(_source2); }
public void GetConstantSource2_NoConstantExpression () { var resultOperator = new IntersectResultOperator (Expression.Parameter (typeof (IEnumerable<string>), "ss")); resultOperator.GetConstantSource2<string> (); }
public void GetConstantSource2_NoConstantExpression() { var resultOperator = new IntersectResultOperator(Expression.Parameter(typeof(IEnumerable <string>), "ss")); resultOperator.GetConstantSource2 <string> (); }