コード例 #1
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (Url != null)
         {
             hashCode = hashCode * 59 + Url.GetHashCode();
         }
         if (LatStart != null)
         {
             hashCode = hashCode * 59 + LatStart.GetHashCode();
         }
         if (LonStart != null)
         {
             hashCode = hashCode * 59 + LonStart.GetHashCode();
         }
         if (LatEnd != null)
         {
             hashCode = hashCode * 59 + LatEnd.GetHashCode();
         }
         if (LonEnd != null)
         {
             hashCode = hashCode * 59 + LonEnd.GetHashCode();
         }
         if (RoatationDegrees != null)
         {
             hashCode = hashCode * 59 + RoatationDegrees.GetHashCode();
         }
         return(hashCode);
     }
 }
コード例 #2
0
 public override void WriteLayerProperties(System.Xml.XmlTextWriter xmlWriter)
 {
     xmlWriter.WriteAttributeString("LatStart", LatStart.ToString());
     xmlWriter.WriteAttributeString("LngStart", LngStart.ToString());
     xmlWriter.WriteAttributeString("LatEnd", LatEnd.ToString());
     xmlWriter.WriteAttributeString("LngEnd", LngEnd.ToString());
     xmlWriter.WriteAttributeString("Width", Width.ToString());
     xmlWriter.WriteAttributeString("PercentComplete", PercentComplete.ToString());
 }
コード例 #3
0
        /// <summary>
        /// Returns true if HeatMapImage instances are equal
        /// </summary>
        /// <param name="other">Instance of HeatMapImage to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(HeatMapImage other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Url == other.Url ||
                     Url != null &&
                     Url.Equals(other.Url)
                     ) &&
                 (
                     LatStart == other.LatStart ||
                     LatStart != null &&
                     LatStart.Equals(other.LatStart)
                 ) &&
                 (
                     LonStart == other.LonStart ||
                     LonStart != null &&
                     LonStart.Equals(other.LonStart)
                 ) &&
                 (
                     LatEnd == other.LatEnd ||
                     LatEnd != null &&
                     LatEnd.Equals(other.LatEnd)
                 ) &&
                 (
                     LonEnd == other.LonEnd ||
                     LonEnd != null &&
                     LonEnd.Equals(other.LonEnd)
                 ) &&
                 (
                     RoatationDegrees == other.RoatationDegrees ||
                     RoatationDegrees != null &&
                     RoatationDegrees.Equals(other.RoatationDegrees)
                 ));
        }