Пример #1
0
 public override int GetHashCode()
 {
     unchecked {
         var hashCode = inherit.GetHashCode();
         hashCode = (hashCode * 397) ^ (color != null ? color.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (backgroundColor != null ? backgroundColor.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ fontSize.GetHashCode();
         hashCode = (hashCode * 397) ^ (fontWeight != null ? fontWeight.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ fontStyle.GetHashCode();
         hashCode = (hashCode * 397) ^ letterSpacing.GetHashCode();
         hashCode = (hashCode * 397) ^ wordSpacing.GetHashCode();
         hashCode = (hashCode * 397) ^ textBaseline.GetHashCode();
         hashCode = (hashCode * 397) ^ height.GetHashCode();
         hashCode = (hashCode * 397) ^ (decoration != null ? decoration.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (decorationColor != null ? decorationColor.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ decorationStyle.GetHashCode();
         hashCode = (hashCode * 397) ^ decorationThickness.GetHashCode();
         hashCode = (hashCode * 397) ^ (foreground != null ? foreground.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (background != null ? background.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (fontFamily != null ? fontFamily.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^
                    (fontFamilyFallback != null ? fontFamilyFallback.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (shadows != null ? shadows.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (fontFeatures != null ? fontFeatures.GetHashCode() : 0);
         return(hashCode);
     }
 }