Пример #1
0
        public GeoHashQuery JoinWith(GeoHashQuery other)
        {
            if (other.IsPrefix(this))
            {
                return(new GeoHashQuery(_startValue, other._endValue));
            }

            if (IsPrefix(other))
            {
                return(new GeoHashQuery(other._startValue, _endValue));
            }

            if (IsSuperQuery(other))
            {
                return(other);
            }

            if (other.IsSuperQuery(this))
            {
                return(this);
            }

            throw new ArgumentException("Can't join these 2 queries: " + this + ", " + other);
        }
Пример #2
0
 public bool CanJoinWith(GeoHashQuery other)
 {
     return(IsPrefix(other) || other.IsPrefix(this) || IsSuperQuery(other) || other.IsSuperQuery(this));
 }