Пример #1
0
 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);
     }
 }
Пример #2
0
 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 != null ? Killer.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)KillerAgent;
         hashCode = (hashCode * 397) ^ (KillerWeaponAttachmentIds?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (int)KillerWeaponStockId;
         hashCode = (hashCode * 397) ^ (KillerWorldLocation != null ? KillerWorldLocation.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Victim != null ? Victim.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)VictimAgent;
         hashCode = (hashCode * 397) ^ (VictimAttachmentIds?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (int)VictimStockId;
         hashCode = (hashCode * 397) ^ (VictimWorldLocation != null ? VictimWorldLocation.GetHashCode() : 0);
         return(hashCode);
     }
 }
Пример #3
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));
        }
Пример #4
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Assistants?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ DeathDisposition.GetHashCode();
         hashCode = (hashCode * 397) ^ ImpulseId.GetHashCode();
         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) ^ (KillerWeaponAttachmentIds?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ KillerWeaponStockId.GetHashCode();
         hashCode = (hashCode * 397) ^ (KillerWorldLocation?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ MedalId.GetHashCode();
         hashCode = (hashCode * 397) ^ (Player?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ RoundIndex.GetHashCode();
         hashCode = (hashCode * 397) ^ ShotsFired.GetHashCode();
         hashCode = (hashCode * 397) ^ ShotsLanded.GetHashCode();
         hashCode = (hashCode * 397) ^ TimeWeaponActiveAsPrimary.GetHashCode();
         hashCode = (hashCode * 397) ^ (Victim?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ VictimAgent.GetHashCode();
         hashCode = (hashCode * 397) ^ (VictimAttachmentIds?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ VictimStockId.GetHashCode();
         hashCode = (hashCode * 397) ^ (VictimWorldLocation?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (WeaponAttachmentIds?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ WeaponStockId.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)EventName;
         hashCode = (hashCode * 397) ^ TimeSinceStart.GetHashCode();
         return(hashCode);
     }
 }
Пример #5
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));
        }