Esempio n. 1
0
        public string ToPostData()
        {
            // Querying for closed gas stations is currently not supported
            string postString =
                String.Format("data=[\"\",\"{0}\",{1},{2},{3},{4}]",
                              this.FuelType.ToSpritpreisrechnerString(),
                              Longitude1.ToString(CultureInfo.InvariantCulture),
                              Latitude1.ToString(CultureInfo.InvariantCulture),
                              Longitude2.ToString(CultureInfo.InvariantCulture),
                              Latitude2.ToString(CultureInfo.InvariantCulture));

            return(postString);
        }
Esempio n. 2
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="Latitude1">A latitude.</param>
        /// <param name="Latitude2">Another latitude.</param>
        /// <returns>true|false</returns>
        public static Boolean operator  >(Latitude Latitude1, Latitude Latitude2)
        {
            if ((Object)Latitude1 == null)
            {
                throw new ArgumentNullException("The given Latitude1 must not be null!");
            }

            if ((Object)Latitude2 == null)
            {
                throw new ArgumentNullException("The given Latitude2 must not be null!");
            }

            return(Latitude1.CompareTo(Latitude2) > 0);
        }
Esempio n. 3
0
        /// <summary>
        /// Compares two latitudes for equality.
        /// </summary>
        /// <param name="Latitude1">A latitude.</param>
        /// <param name="Latitude2">Another latitude.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public static Boolean operator ==(Latitude Latitude1, Latitude Latitude2)
        {
            // If both are null, or both are same instance, return true.
            if (Object.ReferenceEquals(Latitude1, Latitude2))
            {
                return(true);
            }

            // If one is null, but not both, return false.
            if (((Object)Latitude1 == null) || ((Object)Latitude2 == null))
            {
                return(false);
            }

            return(Latitude1.Equals(Latitude2));
        }