Ejemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Latitude.GetHashCode();
         hashCode = (hashCode * 397) ^ Longitude.GetHashCode();
         hashCode = (hashCode * 397) ^ Accuracy.GetHashCode();
         hashCode = (hashCode * 397) ^ Altitude.GetHashCode();
         hashCode = (hashCode * 397) ^ VerticalAccuracy.GetHashCode();
         hashCode = (hashCode * 397) ^ Bearing.GetHashCode();
         hashCode = (hashCode * 397) ^ Speed.GetHashCode();
         return(hashCode);
     }
 }
Ejemplo n.º 2
0
        public override int GetHashCode()
        {
            var hashCode = -681162261;

            hashCode = hashCode * -1521134295 + Latitude.GetHashCode();
            hashCode = hashCode * -1521134295 + Longitude.GetHashCode();
            hashCode = hashCode * -1521134295 + Accuracy.GetHashCode();
            hashCode = hashCode * -1521134295 + Speed.GetHashCode();
            hashCode = hashCode * -1521134295 + Course.GetHashCode();
            hashCode = hashCode * -1521134295 + Altitude.GetHashCode();
            hashCode = hashCode * -1521134295 + VerticalAccuracy.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <DateTimeOffset> .Default.GetHashCode(Timestamp);

            return(hashCode);
        }
Ejemplo n.º 3
0
 public bool Equals(Location other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Latitude.Equals(other.Latitude) && Longitude.Equals(other.Longitude) && Accuracy.Equals(other.Accuracy) && Altitude.Equals(other.Altitude) && VerticalAccuracy.Equals(other.VerticalAccuracy) && Bearing.Equals(other.Bearing) && Speed.Equals(other.Speed));
 }