示例#1
0
        public override int GetHashCode()
        {
            int hc = Id.GetHashCode();

            foreach (var i in Images)
            {
                hc ^= i.GetHashCode();
            }
            hc ^= (int)Stretch << 14;
            hc ^= (int)StretchDirection << 17;
            hc ^= Opacity.GetHashCode();
            hc ^= HorizontalOffset.GetHashCode();
            hc ^= VerticalOffset.GetHashCode();
            hc ^= LeftMarginWidthPercent.GetHashCode();
            hc ^= RightMarginWidthPercent.GetHashCode();
            hc ^= TopMarginHeightPercent.GetHashCode();
            hc ^= BottomMarginHeightPercent.GetHashCode();
            hc ^= MaxHeight.GetHashCode();
            hc ^= MaxWidth.GetHashCode();
            hc ^= Zoom.GetHashCode();
            hc ^= (int)ImagePlacement;
            hc ^= IsRandom ? int.MinValue : 0;
            hc ^= IsEnabled ? 0x40000000 : 0;
            hc ^= Interval.GetHashCode();
            return(hc);
        }
示例#2
0
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;

                if (Domain != null)
                {
                    hashCode = hashCode * 59 + Domain.GetHashCode();
                }

                if (AccessToken != null)
                {
                    hashCode = hashCode * 59 + AccessToken.GetHashCode();
                }

                if (Style != null)
                {
                    hashCode = hashCode * 59 + Style.GetHashCode();
                }

                if (Center != null)
                {
                    hashCode = hashCode * 59 + Center.GetHashCode();
                }

                if (Zoom != null)
                {
                    hashCode = hashCode * 59 + Zoom.GetHashCode();
                }

                if (Bearing != null)
                {
                    hashCode = hashCode * 59 + Bearing.GetHashCode();
                }

                if (Pitch != null)
                {
                    hashCode = hashCode * 59 + Pitch.GetHashCode();
                }

                if (Layers != null)
                {
                    hashCode = hashCode * 59 + Layers.GetHashCode();
                }

                if (UiRevision != null)
                {
                    hashCode = hashCode * 59 + UiRevision.GetHashCode();
                }

                return(hashCode);
            }
        }
示例#3
0
        public override int GetHashCode()
        {
            var hashCode = -1051533646;

            hashCode = hashCode * -1521134295 + Zoom.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(MapTypeId);

            hashCode = hashCode * -1521134295 + EqualityComparer <Geocoordinate> .Default.GetHashCode(Center);

            return(hashCode);
        }
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 13;
         hash = (hash * 7) + Zoom.GetHashCode();
         hash = (hash * 7) + PixelInMetersOnXAxis.GetHashCode();
         hash = (hash * 7) + PixelInMetersOnYAxis.GetHashCode();
         hash = (hash * 7) + Description.GetHashCode();
         return(hash);
     }
 }
示例#5
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = MapType.GetHashCode();
         hashCode = hashCode * 397 ^ Center.GetHashCode();
         hashCode = hashCode * 397 ^ Zoom.GetHashCode();
         hashCode = hashCode * 397 ^ IsZoomControlVisible.GetHashCode();
         hashCode = hashCode * 397 ^ HasGestureEnabled.GetHashCode();
         hashCode = hashCode * 397 ^ ZoomControlPosition.GetHashCode();
         return(hashCode);
     }
 }
示例#6
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 (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (City != null)
         {
             hashCode = hashCode * 59 + City.GetHashCode();
         }
         if (Lat != null)
         {
             hashCode = hashCode * 59 + Lat.GetHashCode();
         }
         if (Lon != null)
         {
             hashCode = hashCode * 59 + Lon.GetHashCode();
         }
         if (Zoom != null)
         {
             hashCode = hashCode * 59 + Zoom.GetHashCode();
         }
         if (Start != null)
         {
             hashCode = hashCode * 59 + Start.GetHashCode();
         }
         if (End != null)
         {
             hashCode = hashCode * 59 + End.GetHashCode();
         }
         return(hashCode);
     }
 }
示例#7
0
 public override int GetHashCode()
 {
     return(331 + Zoom.GetHashCode() * 389 + Tile.GetHashCode());
 }
示例#8
0
 /// <summary>
 /// Returns a hashcode for this tile position.
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     return(X.GetHashCode() ^
            Y.GetHashCode() ^
            Zoom.GetHashCode());
 }