コード例 #1
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);
     }
 }