コード例 #1
0
 /// <summary>
 /// Returns the hash code for this instance.
 /// </summary>
 /// <returns>A 32-bit signed integer hash code.</returns>
 public override int GetHashCode()
 {
     return(OverrideHelper.HashCodes(
                Bold.GetHashCode(),
                Italic.GetHashCode(),
                WordWeapping.GetHashCode(),
                FontSize.GetHashCode(),
                FontFamilyName.GetHashCode()));
 }
コード例 #2
0
        public override int GetHashCode()
        {
            var hash = 17;

            hash = hash * 23 + Family.GetHashCode();
            hash = hash * 23 + Size.GetHashCode();
            hash = hash * 23 + Bold.GetHashCode();
            hash = hash * 23 + Italic.GetHashCode();
            hash = hash * 23 + Baseline.GetHashCode();
            return(hash);
        }
コード例 #3
0
        public override int GetHashCode()
        {
            int ret = 0;

            ret += Family == null ? 0 : Family.GetHashCode();
            ret += Size;
            ret += Bold.GetHashCode();
            ret += Italic.GetHashCode();
            ret += Underline.GetHashCode();
            return(ret);
        }
コード例 #4
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (TextColor != null ? TextColor.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ FontSize.GetHashCode();
         hashCode = (hashCode * 397) ^ Bold.GetHashCode();
         hashCode = (hashCode * 397) ^ Italic.GetHashCode();
         hashCode = (hashCode * 397) ^ Alignment.GetHashCode();
         return(hashCode);
     }
 }
コード例 #5
0
ファイル: XLFont.cs プロジェクト: zamabraga/ClosedXML
 public override int GetHashCode()
 {
     return(Bold.GetHashCode()
            ^ Italic.GetHashCode()
            ^ (Int32)Underline
            ^ Strikethrough.GetHashCode()
            ^ (Int32)VerticalAlignment
            ^ Shadow.GetHashCode()
            ^ FontSize.GetHashCode()
            ^ FontColor.GetHashCode()
            ^ FontName.GetHashCode()
            ^ (Int32)FontFamilyNumbering);
 }
コード例 #6
0
ファイル: XlsxFont.cs プロジェクト: mlnorman/Simplexcel
 public override int GetHashCode()
 {
     unchecked
     {
         int result = (Name != null ? Name.GetHashCode() : 0);
         result = (result * 397) ^ Size;
         result = (result * 397) ^ Bold.GetHashCode();
         result = (result * 397) ^ Italic.GetHashCode();
         result = (result * 397) ^ Underline.GetHashCode();
         result = (result * 397) ^ TextColor.GetHashCode();
         return(result);
     }
 }
コード例 #7
0
        public override int GetHashCode()
        {
            var hashCode = -1593953530;

            hashCode = hashCode * -1521134295 + Name.GetHashCode();
            hashCode = hashCode * -1521134295 + Size.GetHashCode();
            hashCode = hashCode * -1521134295 + Color.GetHashCode();
            hashCode = hashCode * -1521134295 + Bold.GetHashCode();
            hashCode = hashCode * -1521134295 + Italic.GetHashCode();
            hashCode = hashCode * -1521134295 + Strike.GetHashCode();
            hashCode = hashCode * -1521134295 + UnderlineType.GetHashCode();
            return(hashCode);
        }
コード例 #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
ファイル: StyleData.cs プロジェクト: khalid2831/PygmentSharp
 /// <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()
        {
            var hashCode = 1158783753;

            hashCode = hashCode * -1521134295 + Bold.GetHashCode();
            hashCode = hashCode * -1521134295 + Italic.GetHashCode();
            hashCode = hashCode * -1521134295 + Underline.GetHashCode();
            hashCode = hashCode * -1521134295 + Strikethrough.GetHashCode();
            hashCode = hashCode * -1521134295 + VerticalAlignment.GetHashCode();
            hashCode = hashCode * -1521134295 + Shadow.GetHashCode();
            hashCode = hashCode * -1521134295 + FontSize.GetHashCode();
            hashCode = hashCode * -1521134295 + FontColor.GetHashCode();
            hashCode = hashCode * -1521134295 + StringComparer.InvariantCultureIgnoreCase.GetHashCode(FontName);
            hashCode = hashCode * -1521134295 + FontFamilyNumbering.GetHashCode();
            hashCode = hashCode * -1521134295 + FontCharSet.GetHashCode();
            return(hashCode);
        }
コード例 #11
0
ファイル: Font.cs プロジェクト: eksotama/fluentxl
        public override int GetHashCode()
        {
            unchecked
            {
                int hash = 17;

                hash = hash * 23 + Name.GetHashCode();
                if (Size != null)
                {
                    hash = hash * 23 + Size.GetHashCode();
                }
                if (FontFamily != null)
                {
                    hash = hash * 23 + FontFamily.GetHashCode();
                }
                if (VerticalTextAlignment != null)
                {
                    hash = hash * 23 + VerticalTextAlignment.GetHashCode();
                }
                if (Underline != null)
                {
                    hash = hash * 23 + Underline.GetHashCode();
                }
                if (Shadow != null)
                {
                    hash = hash * 23 + Shadow.GetHashCode();
                }
                if (Extend != null)
                {
                    hash = hash * 23 + Extend.GetHashCode();
                }
                if (FontCharSet != null)
                {
                    hash = hash * 23 + FontCharSet.GetHashCode();
                }
                if (Condense != null)
                {
                    hash = hash * 23 + Condense.GetHashCode();
                }
                if (Strike != null)
                {
                    hash = hash * 23 + Strike.GetHashCode();
                }
                if (Italic != null)
                {
                    hash = hash * 23 + Italic.GetHashCode();
                }
                if (Bold != null)
                {
                    hash = hash * 23 + Bold.GetHashCode();
                }
                if (Color != null)
                {
                    hash = hash * 23 + Color.GetHashCode();
                }
                if (FontScheme != null)
                {
                    hash = hash * 23 + FontScheme.GetHashCode();
                }

                return(hash);
            }
        }