IQueryable IQueryProvider.CreateQuery(Expression expression) { Type elementType = TypeSystem.GetElementType(expression.Type); try { return ((IQueryable) Activator.CreateInstance(typeof(RavenQueryable <>).MakeGenericType(elementType), new object[] { this, expression })); } catch (TargetInvocationException tie) { throw tie.InnerException; } }
IQueryable IQueryProvider.CreateQuery(Expression expression) { Type elementType = TypeSystem.GetElementType(expression.Type); try { var makeGenericType = typeof(RavenQueryInspector <>).MakeGenericType(elementType); var args = new object[] { this, ravenQueryStatistics, highlightings, indexName, expression, queryGenerator , databaseCommands , asyncDatabaseCommands, isMapReduce }; return((IQueryable)Activator.CreateInstance(makeGenericType, args)); } catch (TargetInvocationException tie) { throw tie.InnerException; } }
IQueryable IQueryProvider.CreateQuery(Expression expression) { Type elementType = TypeSystem.GetElementType(expression.Type); try { return ((IQueryable) Activator.CreateInstance(typeof(DynamicRavenQueryInspector <>).MakeGenericType(elementType), new object[] { this, ravenQueryStatistics, indexName, expression #if !SILVERLIGHT , databaseCommands #endif #if !NET_3_5 , asyncDatabaseCommands #endif })); } catch (TargetInvocationException tie) { throw tie.InnerException; } }