public override int GetHashCode() { unchecked { var hashCode = Assistants?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ (int)DeathDisposition; hashCode = (hashCode * 397) ^ IsAssassination.GetHashCode(); hashCode = (hashCode * 397) ^ IsGroundPound.GetHashCode(); hashCode = (hashCode * 397) ^ IsHeadshot.GetHashCode(); hashCode = (hashCode * 397) ^ IsMelee.GetHashCode(); hashCode = (hashCode * 397) ^ IsShoulderBash.GetHashCode(); hashCode = (hashCode * 397) ^ IsWeapon.GetHashCode(); hashCode = (hashCode * 397) ^ (Killer?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ KillerAgent.GetHashCode(); hashCode = (hashCode * 397) ^ (KillerAttachmentIds?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (int)KillerStockId; hashCode = (hashCode * 397) ^ (KillerWorldLocation?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Victim?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ VictimAgent.GetHashCode(); hashCode = (hashCode * 397) ^ (VictimAttachmentIds?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (int)VictimStockId; hashCode = (hashCode * 397) ^ (VictimWorldLocation?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (int)EventName; hashCode = (hashCode * 397) ^ (TimeSinceStart?.GetHashCode() ?? 0); return(hashCode); } }
public bool Equals(GameEvent other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Assistants.OrderBy(a => a.Gamertag).SequenceEqual(other.Assistants.OrderBy(a => a.Gamertag)) && DeathDisposition == other.DeathDisposition && IsAssassination == other.IsAssassination && IsGroundPound == other.IsGroundPound && IsHeadshot == other.IsHeadshot && IsMelee == other.IsMelee && IsShoulderBash == other.IsShoulderBash && IsWeapon == other.IsWeapon && Equals(Killer, other.Killer) && KillerAgent == other.KillerAgent && KillerAttachmentIds.OrderBy(ka => ka).SequenceEqual(other.KillerAttachmentIds.OrderBy(ka => ka)) && KillerStockId == other.KillerStockId && Equals(KillerWorldLocation, other.KillerWorldLocation) && Equals(Victim, other.Victim) && VictimAgent == other.VictimAgent && VictimAttachmentIds.OrderBy(ka => ka).SequenceEqual(other.VictimAttachmentIds.OrderBy(ka => ka)) && VictimStockId == other.VictimStockId && Equals(VictimWorldLocation, other.VictimWorldLocation) && Equals(EventName, other.EventName) && string.Equals(TimeSinceStart, other.TimeSinceStart)); }