Esempio n. 1
0
 public CalculationModel(object lockToken,
                         CalculationAccuracy accuracy,
                         ShopProbability shopProbability,
                         List <Unit> units)
 {
     this.lockToken       = lockToken;
     this.shopProbability = shopProbability;
     this.units           = units;
     this.accuracy        = accuracy;
 }
Esempio n. 2
0
        public SolrQueryByDistance(string fieldName, double pointLatitude, double pointLongitude, int distance, CalculationAccuracy accurancy)
        {
            if (string.IsNullOrEmpty(fieldName)) { throw new ArgumentNullException(); }
            if(distance <= 0) { throw new ArgumentOutOfRangeException("Distance must be greater than zero."); }

            FieldName = fieldName;
            PointLatitude = pointLatitude;
            PointLongitude = pointLongitude;
            DistanceFromPoint = distance;
            Accuracy = accurancy;
        }
Esempio n. 3
0
        public SolrQueryByDistance(string fieldName, Location location, double distance, CalculationAccuracy accuracy)
        {
            if (string.IsNullOrEmpty(fieldName))
                throw new ArgumentNullException("fieldName");

            if (location == null)
                throw new ArgumentNullException("location");

            if (distance <= 0)
                throw new ArgumentOutOfRangeException("distance", "Distance must be greater than zero.");

            FieldName = fieldName;
            Location = location;
            DistanceFromPoint = distance;
            Accuracy = accuracy;
        }
Esempio n. 4
0
        /// <summary>
        /// New query by distance
        /// </summary>
        /// <param name="fieldName"></param>
        /// <param name="pointLatitude"></param>
        /// <param name="pointLongitude"></param>
        /// <param name="distance"></param>
        /// <param name="accurancy"></param>
        public SolrQueryByDistance(string fieldName, double pointLatitude, double pointLongitude, int distance, CalculationAccuracy accurancy)
        {
            if (string.IsNullOrEmpty(fieldName))
            {
                throw new ArgumentNullException("fieldName");
            }
            if (distance <= 0)
            {
                throw new ArgumentOutOfRangeException("distance", "Distance must be greater than zero.");
            }

            FieldName         = fieldName;
            PointLatitude     = pointLatitude;
            PointLongitude    = pointLongitude;
            DistanceFromPoint = distance;
            Accuracy          = accurancy;
        }
        public SolrQueryByDistance(string fieldName, Location location, double distance, CalculationAccuracy accuracy)
        {
            if (string.IsNullOrEmpty(fieldName))
            {
                throw new ArgumentNullException("fieldName");
            }

            if (location == null)
            {
                throw new ArgumentNullException("location");
            }

            if (distance <= 0)
            {
                throw new ArgumentOutOfRangeException("distance", "Distance must be greater than zero.");
            }

            FieldName         = fieldName;
            Location          = location;
            DistanceFromPoint = distance;
            Accuracy          = accuracy;
        }
Esempio n. 6
0
 public SolrQueryByDistance(string fieldName, double pointLatitude, double pointLongitude, double distance, CalculationAccuracy accuracy)
     : this(fieldName, new Location(pointLatitude, pointLongitude), distance, accuracy)
 {
 }
 public SolrQueryByDistance(string fieldName, double pointLatitude, double pointLongitude, double distance, CalculationAccuracy accuracy) : this(fieldName, new Location(pointLatitude, pointLongitude), distance, accuracy)
 {
 }