Esempio n. 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);
        }
            public override int GetHashCode()
            {
                var hashCode = 1855489041;

                hashCode = hashCode * -1521134295 + Scale.GetHashCode();
                hashCode = hashCode * -1521134295 + EqualityComparer <Size> .Default.GetHashCode(CurrentSize);

                hashCode = hashCode * -1521134295 + HorizontalOffset.GetHashCode();
                hashCode = hashCode * -1521134295 + VerticalOffset.GetHashCode();
                hashCode = hashCode * -1521134295 + ShowGridLines.GetHashCode();
                return(hashCode);
            }