public override int GetHashCode() { unchecked { var hashCode = (ModifiedTimestamp != null ? ModifiedTimestamp.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (CreatedIn != null ? CreatedIn.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ModifiedIn != null ? ModifiedIn.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Title != null ? Title.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Language != null ? Language.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (CcliIdentifier != null ? CcliIdentifier.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Copyright != null ? Copyright.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ReleaseYear != null ? ReleaseYear.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Authors != null ? Authors.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (RightsManagement != null ? RightsManagement.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Publisher != null ? Publisher.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Version != null ? Version.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Key != null ? Key.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Transposition; hashCode = (hashCode * 397) ^ (Tempo != null ? Tempo.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Variant != null ? Variant.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Themes != null ? Themes.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Comment != null ? Comment.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (SongBooks != null ? SongBooks.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Parts != null ? Parts.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (PartSequence != null ? PartSequence.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (QualityIssues != null ? QualityIssues.GetHashCode() : 0); return(hashCode); } }
/// <summary> /// The song constructor /// </summary> public Song() { Themes = new TagList(); Parts = new ComparableOrderedList <SongPart>(); PartSequence = new ComparableOrderedList <SongPart>(); SongBooks = new SongBooks(); Authors = new SongAuthors(); Comment = string.Empty; QualityIssues = new QualityIssues(); }
protected bool Equals(QualityIssues other) { if (Count != other.Count) { return(false); } if (this.Any(e => !other.Contains(e))) { return(false); } return(other.All(Contains)); }