Пример #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Color.GetHashCode();
         hashCode = (hashCode * 397) ^ Width.GetHashCode();
         hashCode = (hashCode * 397) ^ Height.GetHashCode();
         hashCode = (hashCode * 397) ^ BackgroundColor.GetHashCode();
         hashCode = (hashCode * 397) ^ BorderLeftColor.GetHashCode();
         hashCode = (hashCode * 397) ^ BorderLeftWidth.GetHashCode();
         hashCode = (hashCode * 397) ^ BorderRightColor.GetHashCode();
         hashCode = (hashCode * 397) ^ BorderTopColor.GetHashCode();
         hashCode = (hashCode * 397) ^ BorderBottomColor.GetHashCode();
         hashCode = (hashCode * 397) ^ BorderRightWidth.GetHashCode();
         hashCode = (hashCode * 397) ^ BorderTopWidth.GetHashCode();
         hashCode = (hashCode * 397) ^ BorderBottomWidth.GetHashCode();
         hashCode = (hashCode * 397) ^ Font.GetHashCode();
         hashCode = (hashCode * 397) ^ FontSize.GetHashCode();
         hashCode = (hashCode * 397) ^ HAlign.GetHashCode();
         hashCode = (hashCode * 397) ^ VAlign.GetHashCode();
         hashCode = (hashCode * 397) ^ IsLineThrough.GetHashCode();
         hashCode = (hashCode * 397) ^ IsOverline.GetHashCode();
         hashCode = (hashCode * 397) ^ IsUnderline.GetHashCode();
         hashCode = (hashCode * 397) ^ IsItalic.GetHashCode();
         hashCode = (hashCode * 397) ^ IsBold.GetHashCode();
         hashCode = (hashCode * 397) ^ BorderBottomStyle.GetHashCode();
         hashCode = (hashCode * 397) ^ BorderLeftStyle.GetHashCode();
         hashCode = (hashCode * 397) ^ BorderRightStyle.GetHashCode();
         hashCode = (hashCode * 397) ^ BorderTopStyle.GetHashCode();
         return(hashCode);
     }
 }
Пример #2
0
        public override int GetHashCode()
        {
            int hash = 17;

            hash = hash * 31 + FontSize.GetHashCode();
            hash = hash * 31 + Content.GetHashCode();
            hash = hash * 31 + BackgroundColor.GetHashCode();
            return(hash);
        }
        /// <summary>
        /// <para>Returns a unique hash for this of <see cref="AssetIconsCameraSetup"/>.</para>
        /// </summary>
        /// <returns>
        /// <para>An <see cref="int"/> that represents a unique has of this instance.</para>
        /// </returns>
        public override int GetHashCode()
        {
            int hashCode = -1977805934;

            hashCode = hashCode * -1521134295 + Padding.GetHashCode();
            hashCode = hashCode * -1521134295 + PreviewDirection.GetHashCode();
            hashCode = hashCode * -1521134295 + TransparentBackground.GetHashCode();
            hashCode = hashCode * -1521134295 + BackgroundColor.GetHashCode();
            hashCode = hashCode * -1521134295 + Orthographic.GetHashCode();
            return(hashCode);
        }
Пример #4
0
        public override int GetHashCode()
        {
            int hash = Text?.GetHashCode() ?? -1;

            hash ^= BackgroundColor.GetHashCode();
            hash ^= ForegroundColor.GetHashCode();
            hash ^= FontAttributes.GetHashCode();
            hash ^= FontSize.GetHashCode();
            hash ^= Command?.GetHashCode() ?? -1;
            hash ^= CommandParameter?.GetHashCode() ?? -1;
            return(hash);
        }
Пример #5
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = TextSize.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)TextStyle;
         hashCode = (hashCode * 397) ^ TextColor.GetHashCode();
         hashCode = (hashCode * 397) ^ BackgroundColor.GetHashCode();
         hashCode = (hashCode * 397) ^ IsClickable.GetHashCode();
         hashCode = (hashCode * 397) ^ (ClickValue != null ? ClickValue.GetHashCode() : 0);
         return(hashCode);
     }
 }
Пример #6
0
        public override int GetHashCode()
        {
            int hashCode = 253911835;

            hashCode = hashCode * -1521134295 + HorizontalAlignment.GetHashCode();
            hashCode = hashCode * -1521134295 + VerticalAlignment.GetHashCode();
            hashCode = hashCode * -1521134295 + HasBorder.GetHashCode();
            hashCode = hashCode * -1521134295 + WrapText.GetHashCode();
            hashCode = hashCode * -1521134295 + BackgroundColor.GetHashCode();
            hashCode = hashCode * -1521134295 + Font.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(DataFormat);

            return(hashCode);
        }
Пример #7
0
        public override int GetHashCode()
        {
            var hash = base.GetHashCode();

            if (Action != null)
            {
                hash = hash * 23 + Action.GetHashCode();
            }
            hash = hash * 23 + TextColor.GetHashCode();
            hash = hash * 23 + BackgroundColor.GetHashCode();
            hash = hash * 23 + Underline.GetHashCode();
            hash = hash * 23 + Strikethrough.GetHashCode();
            return(hash);
        }
Пример #8
0
        public override int GetHashCode()
        {
            int hash = base.GetHashCode();

            hash ^= ForegroundColor.GetHashCode();
            hash ^= BackgroundColor.GetHashCode();
            hash ^= Underline.GetHashCode();
            hash ^= Bold.GetHashCode();
            hash ^= Italic.GetHashCode();
            if (Text != null)
            {
                hash ^= Text.GetHashCode();
            }
            return(hash);
        }
Пример #9
0
 /// <summary>Serves as the default hash function. </summary>
 /// <returns>A hash code for the current object.</returns>
 /// <filterpriority>2</filterpriority>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Color != null ? Color.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Bold.GetHashCode();
         hashCode = (hashCode * 397) ^ Italic.GetHashCode();
         hashCode = (hashCode * 397) ^ Underline.GetHashCode();
         hashCode = (hashCode * 397) ^ (BackgroundColor != null ? BackgroundColor.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (BorderColor != null ? BorderColor.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Roman.GetHashCode();
         hashCode = (hashCode * 397) ^ Sans.GetHashCode();
         hashCode = (hashCode * 397) ^ Mono.GetHashCode();
         return(hashCode);
     }
 }
Пример #10
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (IconPath.Length != 0)
            {
                hash ^= IconPath.GetHashCode();
            }
            if (Title.Length != 0)
            {
                hash ^= Title.GetHashCode();
            }
            if (Header.Length != 0)
            {
                hash ^= Header.GetHashCode();
            }
            if (headerColor_ != null)
            {
                hash ^= HeaderColor.GetHashCode();
            }
            if (Background.Length != 0)
            {
                hash ^= Background.GetHashCode();
            }
            if (backgroundColor_ != null)
            {
                hash ^= BackgroundColor.GetHashCode();
            }
            hash ^= storeSubcategories_.GetHashCode();
            if (HeaderPrefab.Length != 0)
            {
                hash ^= HeaderPrefab.GetHashCode();
            }
            if (itemColor_ != null)
            {
                hash ^= ItemColor.GetHashCode();
            }
            if (Enabled != false)
            {
                hash ^= Enabled.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #11
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (backgroundColor_ != null)
            {
                hash ^= BackgroundColor.GetHashCode();
            }
            if (description_ != null)
            {
                hash ^= Description.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #12
0
        public int GetSettingsHashCode()
        {
            var hashes = new int[]
            { TextColor.GetHashCode(),
                OverrideTextColor.GetHashCode(),
                BackgroundColor.GetHashCode(),
                BackgroundColor2.GetHashCode(),
                GradientString.GetHashCode(),
                Display2Rows.GetHashCode(),
                ProbabilityText.GetHashCode(),
                Weight.GetHashCode(),
                CutoffTime.GetHashCode(),
                chkUsePb.Checked.GetHashCode(),
                dataGridSplits.Rows.GetHashCode() };

            // Rough hashing algorithm thanks to https://stackoverflow.com/questions/3404715/
            return(hashes.Aggregate(hashes.Length, (hash, element) => unchecked (314159 * hash + element)));
        }
Пример #13
0
        public override int GetHashCode()
        {
            var hashCode = 2043579837;

            if (HasNoFill())
            {
                return(hashCode);
            }

            hashCode = hashCode * -1521134295 + PatternType.GetHashCode();
            hashCode = hashCode * -1521134295 + BackgroundColor.GetHashCode();

            if (HasNoForeground())
            {
                return(hashCode);
            }

            hashCode = hashCode * -1521134295 + PatternColor.GetHashCode();

            return(hashCode);
        }
Пример #14
0
        /// <summary>
        /// return a hash code
        /// </summary>
        /// <returns>hashcode as <see cref="int" /></returns>
        public override int GetHashCode()
        {
            var hashCode = -2087474320;

            hashCode = hashCode * -1521134295 + HeaderFullWidth.GetHashCode();
            hashCode = hashCode * -1521134295 + HeaderFullHeight.GetHashCode();
            hashCode = hashCode * -1521134295 + HeaderFocusWidth.GetHashCode();
            hashCode = hashCode * -1521134295 + HeaderFocusHeight.GetHashCode();
            hashCode = hashCode * -1521134295 + AvatarShape.GetHashCode();
#if NETSTANDARD2_0
            hashCode = hashCode * -1521134295 + BackgroundColor.GetHashCode();
#else
            hashCode = hashCode * -1521134295 + BackgroundColor.GetHashCode();
#endif
            hashCode = hashCode * -1521134295 + BodyFont.GetHashCode();
            hashCode = hashCode * -1521134295 + HeaderBounds.GetHashCode();
            hashCode = hashCode * -1521134295 + HeaderImage.GetHashCode();
            hashCode = hashCode * -1521134295 + HeaderImageFocused.GetHashCode();
            hashCode = hashCode * -1521134295 + HeaderImageScaled.GetHashCode();
            hashCode = hashCode * -1521134295 + HeaderStretch.GetHashCode();
#if NETSTANDARD2_0
            hashCode = hashCode * -1521134295 + LinkColor.GetHashCode();
#else
            hashCode = hashCode * -1521134295 + LinkColor.GetHashCode();
#endif
            hashCode = hashCode * -1521134295 + ShowAvatar.GetHashCode();
            hashCode = hashCode * -1521134295 + ShowDescription.GetHashCode();
            hashCode = hashCode * -1521134295 + ShowHeaderImage.GetHashCode();
            hashCode = hashCode * -1521134295 + ShowTitle.GetHashCode();
#if NETSTANDARD2_0
            hashCode = hashCode * -1521134295 + TitleColor.GetHashCode();
#else
            hashCode = hashCode * -1521134295 + TitleColor.GetHashCode();
#endif
            hashCode = hashCode * -1521134295 + TitleFont.GetHashCode();
            hashCode = hashCode * -1521134295 + TitleFontWeight.GetHashCode();
            return(hashCode);
        }
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (FileId != null)
         {
             hashCode = hashCode * 59 + FileId.GetHashCode();
         }
         if (PageRange != null)
         {
             hashCode = hashCode * 59 + PageRange.GetHashCode();
         }
         hashCode = hashCode * 59 + ThumbnailWidth.GetHashCode();
         hashCode = hashCode * 59 + ThumbnailHeight.GetHashCode();
         if (BackgroundColor != null)
         {
             hashCode = hashCode * 59 + BackgroundColor.GetHashCode();
         }
         hashCode = hashCode * 59 + ThumbnailFitToPageSize.GetHashCode();
         return(hashCode);
     }
 }
Пример #16
0
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                return(hashCode);
            }
        }
Пример #17
0
 public override int GetHashCode() =>
 (BackgroundColor?.GetHashCode() ?? 0) ^
 PhysicalSize.GetHashCode() ^
 Dpi.GetHashCode();
Пример #18
0
 // override object.GetHashCode
 public override int GetHashCode()
 {
     return(Object.GetHashCode() + BackgroundColor.GetHashCode() + ForegroundColor.GetHashCode());
 }
Пример #19
0
 public override int GetHashCode()
 {
     return(BackgroundColor.GetHashCode()
            ^ (Int32)PatternType
            ^ PatternColor.GetHashCode());
 }
Пример #20
0
 /// <summary>
 /// Gets a hash code for this instance.
 /// </summary>
 /// <returns>A hash code.</returns>
 public override int GetHashCode()
 {
     return(MaxCircleCapacity.GetHashCode() ^ MaxCapacityInCircle.GetHashCode() ^ CircleVerInterval.GetHashCode() ^ MaxImageLength.GetHashCode()
            ^ Alpha.GetHashCode() ^ BackgroundColor.GetHashCode()
            ^ OrginalCenter.GetHashCode() ^ Radius.GetHashCode());
 }