Пример #1
0
        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));
        }
Пример #2
0
        public bool Equals(GameEvent other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(((Assistants == null && other.Assistants == null) || (Assistants != null && other.Assistants != null && Assistants.OrderBy(a => a.Gamertag).SequenceEqual(other.Assistants.OrderBy(a => a.Gamertag)))) &&
                   DeathDisposition == other.DeathDisposition &&
                   ImpulseId == other.ImpulseId &&
                   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 &&
                   ((KillerWeaponAttachmentIds == null && other.KillerWeaponAttachmentIds == null) || (KillerWeaponAttachmentIds != null && other.KillerWeaponAttachmentIds != null && KillerWeaponAttachmentIds.OrderBy(ka => ka).SequenceEqual(other.KillerWeaponAttachmentIds.OrderBy(ka => ka)))) &&
                   KillerWeaponStockId == other.KillerWeaponStockId &&
                   Equals(KillerWorldLocation, other.KillerWorldLocation) &&
                   MedalId == other.MedalId &&
                   Equals(Player, other.Player) &&
                   RoundIndex == other.RoundIndex &&
                   ShotsFired == other.ShotsFired &&
                   ShotsLanded == other.ShotsLanded &&
                   TimeWeaponActiveAsPrimary.Equals(other.TimeWeaponActiveAsPrimary) &&
                   Equals(Victim, other.Victim) &&
                   VictimAgent == other.VictimAgent &&
                   ((VictimAttachmentIds == null && other.VictimAttachmentIds == null) || (VictimAttachmentIds != null && other.VictimAttachmentIds != null && VictimAttachmentIds.OrderBy(ka => ka).SequenceEqual(other.VictimAttachmentIds.OrderBy(ka => ka)))) &&
                   VictimStockId == other.VictimStockId &&
                   Equals(VictimWorldLocation, other.VictimWorldLocation) &&
                   ((WeaponAttachmentIds == null && other.WeaponAttachmentIds == null) || (WeaponAttachmentIds != null && other.WeaponAttachmentIds != null && WeaponAttachmentIds.OrderBy(ka => ka).SequenceEqual(other.WeaponAttachmentIds.OrderBy(ka => ka)))) &&
                   WeaponStockId == other.WeaponStockId &&
                   EventName == other.EventName &&
                   TimeSinceStart.Equals(other.TimeSinceStart));
        }