/// <summary> /// Initializes a new instance of the <see cref="RavenQueryInspector{T}"/> class. /// </summary> public RavenQueryInspector( IRavenQueryProvider provider, RavenQueryStatistics queryStats, string indexName, Expression expression #if !SILVERLIGHT , IDatabaseCommands databaseCommands #endif #if !NET_3_5 , IAsyncDatabaseCommands asyncDatabaseCommands #endif ) { if (provider == null) { throw new ArgumentNullException("provider"); } this.provider = provider.For <T>(); this.queryStats = queryStats; this.indexName = indexName; #if !SILVERLIGHT this.databaseCommands = databaseCommands; #endif #if !NET_3_5 this.asyncDatabaseCommands = asyncDatabaseCommands; #endif this.provider.AfterQueryExecuted(queryStats.UpdateQueryStats); this.expression = expression ?? Expression.Constant(this); }
/// <summary> /// Initializes a new instance of the <see cref="RavenQueryInspector{T}"/> class. /// </summary> public RavenQueryInspector( IRavenQueryProvider provider, RavenQueryStatistics queryStats, RavenQueryHighlightings highlightings, string indexName, Expression expression, InMemoryDocumentSessionOperations session #if !SILVERLIGHT , IDatabaseCommands databaseCommands #endif , IAsyncDatabaseCommands asyncDatabaseCommands, bool isMapReduce ) { if (provider == null) { throw new ArgumentNullException("provider"); } this.provider = provider.For <T>(); this.queryStats = queryStats; this.highlightings = highlightings; this.indexName = indexName; this.session = session; #if !SILVERLIGHT this.databaseCommands = databaseCommands; #endif this.asyncDatabaseCommands = asyncDatabaseCommands; this.isMapReduce = isMapReduce; this.provider.AfterQueryExecuted(this.AfterQueryExecuted); this.expression = expression ?? Expression.Constant(this); }
/// <summary> /// Initializes a new instance of the <see cref="RavenQueryInspector{T}"/> class. /// </summary> public void Init( IRavenQueryProvider provider, QueryStatistics queryStats, #if FEATURE_HIGHLIGHTING QueryHighlightings highlightings, #endif string indexName, string collectionName, Expression expression, InMemoryDocumentSessionOperations session, bool isMapReduce) { _conventions = session.Conventions; _provider = provider?.For <T>() ?? throw new ArgumentNullException(nameof(provider)); _queryStats = queryStats; #if FEATURE_HIGHLIGHTING _highlightings = highlightings; #endif _indexName = indexName; _collectionName = collectionName; _session = session; _isMapReduce = isMapReduce; _provider.AfterQueryExecuted(AfterQueryExecuted); _expression = expression ?? Expression.Constant(this); }
public RavenQueryable(IRavenQueryProvider provider) { if (provider == null) { throw new ArgumentNullException("provider"); } this.provider = provider; expression = Expression.Constant(this); }
public ShardedRavenQueryInspector(IRavenQueryProvider provider, RavenQueryStatistics queryStats, RavenQueryHighlightings highlightings, string indexName, Expression expression, InMemoryDocumentSessionOperations session, bool isMapReduce, ShardStrategy shardStrategy, List <IDatabaseCommands> shardDbCommands, List <IAsyncDatabaseCommands> asyncShardDbCommands) : base(provider, queryStats, highlightings, indexName, expression, session, null, null, isMapReduce) { this.shardStrategy = shardStrategy; this.shardDbCommands = shardDbCommands; this.asyncShardDbCommands = asyncShardDbCommands; }
public RavenQueryable(IRavenQueryProvider provider, Expression expression) { if (provider == null) { throw new ArgumentNullException("provider"); } if (expression == null) { throw new ArgumentNullException("expression"); } if (!typeof(IQueryable <T>).IsAssignableFrom(expression.Type)) { throw new ArgumentOutOfRangeException("expression"); } this.provider = provider; this.expression = expression; }
/// <summary> /// Creates a dynamic raven queryable around the provided query provider /// </summary> public DynamicRavenQueryInspector(IRavenQueryProvider queryProvider, RavenQueryStatistics queryStatistics, string indexName, Expression expression #if !SILVERLIGHT , IDatabaseCommands databaseCommands #endif #if !NET_3_5 , IAsyncDatabaseCommands asyncDatabaseCommands #endif ) : base(queryProvider, queryStatistics, indexName, expression #if !SILVERLIGHT , databaseCommands #endif #if !NET_3_5 , asyncDatabaseCommands #endif ) { }
/// <summary> /// Initializes a new instance of the <see cref="RavenQueryInspector{T}"/> class. /// </summary> public void Init( IRavenQueryProvider provider, RavenQueryStatistics queryStats, RavenQueryHighlightings highlightings, string indexName, Expression expression, InMemoryDocumentSessionOperations session , bool isMapReduce ) { if (provider == null) { throw new ArgumentNullException("provider"); } this.provider = provider.For <T>(); this.queryStats = queryStats; this.highlightings = highlightings; this.indexName = indexName; this.session = session; this.isMapReduce = isMapReduce; this.provider.AfterQueryExecuted(this.AfterQueryExecuted); this.expression = expression ?? Expression.Constant(this); }