Наследование: BaseFilterQuery
Пример #1
0
        public BetweenFilterQuery(string fieldName, object from, object to, Inclusion inclusion)
        {
            switch (inclusion)
            {
            case Inclusion.Both:
                LeftQuery  = new FilterQuery(fieldName, from, FilterQuery.FilterQueryTypes.GreaterThanEquals);
                RightQuery = new FilterQuery(fieldName, to, FilterQuery.FilterQueryTypes.LessThanEquals);
                break;

            case Inclusion.Lower:
                LeftQuery  = new FilterQuery(fieldName, from, FilterQuery.FilterQueryTypes.GreaterThanEquals);
                RightQuery = new FilterQuery(fieldName, to, FilterQuery.FilterQueryTypes.LessThan);
                break;

            case Inclusion.Upper:
                LeftQuery  = new FilterQuery(fieldName, from, FilterQuery.FilterQueryTypes.GreaterThan);
                RightQuery = new FilterQuery(fieldName, to, FilterQuery.FilterQueryTypes.LessThanEquals);
                break;

            case Inclusion.None:
                LeftQuery  = new FilterQuery(fieldName, from, FilterQuery.FilterQueryTypes.GreaterThan);
                RightQuery = new FilterQuery(fieldName, to, FilterQuery.FilterQueryTypes.LessThan);
                break;
            }
        }
 public BetweenFilterQuery(string fieldName, object from, object to, Inclusion inclusion)
 {
     switch(inclusion)
     {
         case Inclusion.Both:
             LeftQuery = new FilterQuery(fieldName, from, FilterQuery.FilterQueryTypes.GreaterThanEquals);
             RightQuery = new FilterQuery(fieldName, to, FilterQuery.FilterQueryTypes.LessThanEquals);
             break;
         case Inclusion.Lower:
             LeftQuery = new FilterQuery(fieldName, from, FilterQuery.FilterQueryTypes.GreaterThanEquals);
             RightQuery = new FilterQuery(fieldName, to, FilterQuery.FilterQueryTypes.LessThan);
             break;
         case Inclusion.Upper:
             LeftQuery = new FilterQuery(fieldName, from, FilterQuery.FilterQueryTypes.GreaterThan);
             RightQuery = new FilterQuery(fieldName, to, FilterQuery.FilterQueryTypes.LessThanEquals);
             break;
         case Inclusion.None:
             LeftQuery = new FilterQuery(fieldName, from, FilterQuery.FilterQueryTypes.GreaterThan);
             RightQuery = new FilterQuery(fieldName, to, FilterQuery.FilterQueryTypes.LessThan);
             break;
     }
 }