public override int GetHashCode() { unchecked { var result = (_minified != null ? _minified.GetHashCode() : 0); result = (result * 397) ^ Type.GetHashCode(); result = (result * 397) ^ (Sources != null ? Sources.GetHashCode() : 0); result = (result * 397) ^ (Content != null ? Content.GetHashCode() : 0); result = (result * 397) ^ LastModifiedAt.GetHashCode(); return(result); } }
public int CompareTo(Credential other) { Int32 idCompare = ID.CompareTo(other.ID); if (idCompare != 0) { return(idCompare); } Int32 glyphKeyCompare = GlyphKey.CompareTo(other.GlyphKey); if (glyphKeyCompare != 0) { return(glyphKeyCompare); } Int32 glyphColourCompare = GlyphColour.CompareTo(other.GlyphColour); if (glyphColourCompare != 0) { return(glyphColourCompare); } Int32 nameCompare = Name.CompareTo(other.Name); if (nameCompare != 0) { return(nameCompare); } Int32 descriptionCompare = Description.CompareTo(other.Description); if (descriptionCompare != 0) { return(descriptionCompare); } Int32 websiteCompare = Website.CompareTo(other.Website); if (websiteCompare != 0) { return(websiteCompare); } Int32 createdAtCompare = CreatedAt.CompareTo(other.CreatedAt); if (createdAtCompare != 0) { return(createdAtCompare); } Int32 lastUpdatedAtCompare = LastModifiedAt.CompareTo(other.LastModifiedAt); if (lastUpdatedAtCompare != 0) { return(lastUpdatedAtCompare); } Int32 usernameCompare = Username.CompareTo(other.Username); if (usernameCompare != 0) { return(usernameCompare); } Int32 passwordCompare = Password.CompareTo(other.Password); if (passwordCompare != 0) { return(passwordCompare); } if (Tags.Count == other.Tags.Count) { if (!Tags.OrderBy(i => i).SequenceEqual(other.Tags.OrderBy(i => i))) { return(-1); } } else { return(-1); } Int32 notesCompare = Notes.CompareTo(other.Notes); if (notesCompare != 0) { return(notesCompare); } return(0); }