コード例 #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;
 }
コード例 #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;
        }
コード例 #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;
        }
コード例 #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;
        }
コード例 #5
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;
        }
コード例 #6
0
 public SolrQueryByDistance(string fieldName, double pointLatitude, double pointLongitude, double distance, CalculationAccuracy accuracy)
     : this(fieldName, new Location(pointLatitude, pointLongitude), distance, accuracy)
 {
 }
コード例 #7
0
 public SolrQueryByDistance(string fieldName, double pointLatitude, double pointLongitude, double distance, CalculationAccuracy accuracy) : this(fieldName, new Location(pointLatitude, pointLongitude), distance, accuracy)
 {
 }