Ejemplo n.º 1
0
        public SolrQuery(SolrQueryProvider <TEntity> provider, Expression expression)
        {
            this.Expression = expression ?? throw new ArgumentNullException(nameof(expression));

            this.Provider = provider ?? throw new ArgumentNullException(nameof(provider));

            if (!typeof(IQueryable <TEntity>).IsAssignableFrom(expression.Type))
            {
                throw new ArgumentOutOfRangeException(nameof(expression));
            }
        }
 public Tuple <ISolrQuery, QueryOptions, EnumeratedResult> Translate <TEntity>(SolrQueryProvider <TEntity> provider, Expression expression)
 {
     this.Visit(expression);
     return(new Tuple <ISolrQuery, QueryOptions, EnumeratedResult>(Query, Options, this.EnumeratedResult));
 }
Ejemplo n.º 3
0
 public SolrQuery(SolrQueryProvider <TEntity> provider)
 {
     this.Provider   = provider ?? throw new ArgumentNullException(nameof(provider));
     this.Expression = Expression.Constant(this);
 }