Example #1
0
        public override int GetHashCode()
        {
            var hashCode = -198124310;

            hashCode = hashCode * -1521134295 + (int)LeftBorder;
            hashCode = hashCode * -1521134295 + (int)RightBorder;
            hashCode = hashCode * -1521134295 + (int)TopBorder;
            hashCode = hashCode * -1521134295 + (int)BottomBorder;
            hashCode = hashCode * -1521134295 + (int)DiagonalBorder;
            hashCode = hashCode * -1521134295 + DiagonalUp.GetHashCode();
            hashCode = hashCode * -1521134295 + DiagonalDown.GetHashCode();

            if (LeftBorder != XLBorderStyleValues.None)
            {
                hashCode = hashCode * -1521134295 + LeftBorderColor.GetHashCode();
            }
            if (RightBorder != XLBorderStyleValues.None)
            {
                hashCode = hashCode * -1521134295 + RightBorderColor.GetHashCode();
            }
            if (TopBorder != XLBorderStyleValues.None)
            {
                hashCode = hashCode * -1521134295 + TopBorderColor.GetHashCode();
            }
            if (BottomBorder != XLBorderStyleValues.None)
            {
                hashCode = hashCode * -1521134295 + BottomBorderColor.GetHashCode();
            }
            if (DiagonalBorder != XLBorderStyleValues.None)
            {
                hashCode = hashCode * -1521134295 + DiagonalBorderColor.GetHashCode();
            }

            return(hashCode);
        }
Example #2
0
 public override int GetHashCode()
 {
     return((Int32)LeftBorder
            ^ LeftBorderColor.GetHashCode()
            ^ (Int32)RightBorder
            ^ RightBorderColor.GetHashCode()
            ^ (Int32)TopBorder
            ^ TopBorderColor.GetHashCode()
            ^ (Int32)BottomBorder
            ^ BottomBorderColor.GetHashCode()
            ^ (Int32)DiagonalBorder
            ^ DiagonalBorderColor.GetHashCode()
            ^ DiagonalUp.GetHashCode()
            ^ DiagonalDown.GetHashCode());
 }