/// <summary> /// Returns true if AnimationCard instances are equal /// </summary> /// <param name="other">Instance of AnimationCard to be compared</param> /// <returns>Boolean</returns> public bool Equals(AnimationCard other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Title == other.Title || Title != null && Title.Equals(other.Title) ) && ( Subtitle == other.Subtitle || Subtitle != null && Subtitle.Equals(other.Subtitle) ) && ( Text == other.Text || Text != null && Text.Equals(other.Text) ) && ( Image == other.Image || Image != null && Image.Equals(other.Image) ) && ( Media == other.Media || Media != null && Media.SequenceEqual(other.Media) ) && ( Buttons == other.Buttons || Buttons != null && Buttons.SequenceEqual(other.Buttons) ) && ( Shareable == other.Shareable || Shareable != null && Shareable.Equals(other.Shareable) ) && ( Autoloop == other.Autoloop || Autoloop != null && Autoloop.Equals(other.Autoloop) ) && ( Autostart == other.Autostart || Autostart != null && Autostart.Equals(other.Autostart) )); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (Aspect != null) { hashCode = hashCode * 59 + Aspect.GetHashCode(); } if (Title != null) { hashCode = hashCode * 59 + Title.GetHashCode(); } if (Subtitle != null) { hashCode = hashCode * 59 + Subtitle.GetHashCode(); } if (Text != null) { hashCode = hashCode * 59 + Text.GetHashCode(); } if (Image != null) { hashCode = hashCode * 59 + Image.GetHashCode(); } if (Media != null) { hashCode = hashCode * 59 + Media.GetHashCode(); } if (Buttons != null) { hashCode = hashCode * 59 + Buttons.GetHashCode(); } if (Shareable != null) { hashCode = hashCode * 59 + Shareable.GetHashCode(); } if (Autoloop != null) { hashCode = hashCode * 59 + Autoloop.GetHashCode(); } if (Autostart != null) { hashCode = hashCode * 59 + Autostart.GetHashCode(); } return(hashCode); } }