コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CollectionQueryable{T}"/> class.
 /// </summary>
 /// <param name="collection">The collection.</param>
 /// <param name="queryTimeout">Query timeout, if null uses cluster default.</param>
 public CollectionQueryable(ICouchbaseCollection collection, TimeSpan?queryTimeout)
     : this(collection,
            QueryParserHelper.CreateQueryParser(collection.Scope.Bucket.Cluster),
            new ClusterQueryExecutor(collection.Scope.Bucket.Cluster)
 {
     QueryTimeout = queryTimeout
 })
 {
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BucketQueryable{T}"/> class.
 /// </summary>
 /// <param name="bucket">The bucket.</param>
 /// <param name="configuration">The configuration.</param>
 /// <param name="enableProxyGeneration">If true, generate change tracking proxies for documents during deserialization.</param>
 /// <exception cref="System.ArgumentNullException">bucket</exception>
 /// <exception cref="ArgumentNullException"><paramref name="bucket" /> is <see langword="null" />.</exception>
 public BucketQueryable(IBucket bucket, ClientConfiguration configuration, bool enableProxyGeneration)
     : base(QueryParserHelper.CreateQueryParser(), new BucketQueryExecutor(bucket, configuration, enableProxyGeneration))
 {
     if (bucket == null)
     {
         throw new ArgumentNullException("bucket");
     }
     _bucket = bucket;
 }
コード例 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BucketQueryable{T}"/> class.
        /// </summary>
        /// <param name="bucket">The bucket.</param>
        /// <param name="configuration">The configuration.</param>
        /// <param name="bucketContext">The context object for tracking and managing changes to documents.</param>
        /// <exception cref="System.ArgumentNullException">bucket</exception>
        /// <exception cref="ArgumentNullException"><paramref name="bucket" /> is <see langword="null" />.</exception>
        public BucketQueryable(IBucket bucket, ClientConfiguration configuration, IBucketContext bucketContext)
            : base(QueryParserHelper.CreateQueryParser(bucketContext), new BucketQueryExecutor(bucket, configuration, bucketContext))
        {
            if (bucket == null)
            {
                throw new ArgumentNullException("bucket");
            }

            _bucket = bucket;
            _bucketQueryExecutor = (IBucketQueryExecutor)((DefaultQueryProvider)Provider).Executor;
            _bucketContext       = bucketContext;
        }