internal static EnumerableExecutor Create(Expression expression) { Type execType = typeof(EnumerableExecutor<>).MakeGenericType(expression.Type); return (EnumerableExecutor)Activator.CreateInstance(execType, expression); } }
object IQueryProvider.Execute(System.Linq.Expressions.Expression expression) { if (expression == null) { throw System.Linq.Error.ArgumentNull("expression"); } typeof(EnumerableExecutor <>).MakeGenericType(new Type[] { expression.Type }); return(EnumerableExecutor.Create(expression).ExecuteBoxed()); }