public override int GetHashCode() { unchecked { var hashCode = CooperativeCompletion?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ (FirstCompletionDate != null ? FirstCompletionDate.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (SkullsUnlocked?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (SoloCompletion?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ TotalCooperativePlayTime.GetHashCode(); hashCode = (hashCode * 397) ^ TotalSoloPlayTime.GetHashCode(); return(hashCode); } }
public bool Equals(CampaignLevel other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(CooperativeCompletion.OrderBy(sc => sc.Key).SequenceEqual(other.CooperativeCompletion.OrderBy(sc => sc.Key)) && Equals(FirstCompletionDate, other.FirstCompletionDate) && SkullsUnlocked.OrderBy(s => s).SequenceEqual(other.SkullsUnlocked.OrderBy(s => s)) && SoloCompletion.OrderBy(sc => sc.Key).SequenceEqual(other.SoloCompletion.OrderBy(sc => sc.Key)) && TotalCooperativePlayTime.Equals(other.TotalCooperativePlayTime) && TotalSoloPlayTime.Equals(other.TotalSoloPlayTime)); }