public override int GetHashCode() { unchecked { int hashCode = base.GetHashCode(); hashCode = (hashCode * 397) ^ (CoopStats?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (FlexibleStats?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ MissionId.GetHashCode(); hashCode = (hashCode * 397) ^ (SoloStats?.GetHashCode() ?? 0); return(hashCode); } }
public bool Equals(CampaignMissionStat other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(base.Equals(other) && CoopStats.OrderBy(cs => cs.Key).SequenceEqual(other.CoopStats.OrderBy(cs => cs.Key)) && Equals(FlexibleStats, other.FlexibleStats) && MissionId.Equals(other.MissionId) && SoloStats.OrderBy(ss => ss.Key).SequenceEqual(other.SoloStats.OrderBy(ss => ss.Key))); }