/// <inheritdoc /> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; if (Type != null) { hashCode = hashCode * 59 + Type.GetHashCode(); } if (TypeArray != null) { hashCode = hashCode * 59 + TypeArray.GetHashCode(); } if (Color != null) { hashCode = hashCode * 59 + Color.GetHashCode(); } if (ColorArray != null) { hashCode = hashCode * 59 + ColorArray.GetHashCode(); } if (TypeSrc != null) { hashCode = hashCode * 59 + TypeSrc.GetHashCode(); } if (ColorSrc != null) { hashCode = hashCode * 59 + ColorSrc.GetHashCode(); } return(hashCode); } }
/// <inheritdoc /> public bool Equals([AllowNull] Gradient other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Type == other.Type || Type != null && Type.Equals(other.Type) ) && ( Equals(TypeArray, other.TypeArray) || TypeArray != null && other.TypeArray != null && TypeArray.SequenceEqual(other.TypeArray) ) && ( Color == other.Color || Color != null && Color.Equals(other.Color) ) && ( Equals(ColorArray, other.ColorArray) || ColorArray != null && other.ColorArray != null && ColorArray.SequenceEqual(other.ColorArray) ) && ( TypeSrc == other.TypeSrc || TypeSrc != null && TypeSrc.Equals(other.TypeSrc) ) && ( ColorSrc == other.ColorSrc || ColorSrc != null && ColorSrc.Equals(other.ColorSrc) )); }