Пример #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = BoostAmount;
         hashCode = (hashCode * 397) ^ PlayerRankAmount;
         hashCode = (hashCode * 397) ^ (int)Result;
         hashCode = (hashCode * 397) ^ SpartanRankModifier.GetHashCode();
         hashCode = (hashCode * 397) ^ TimePlayedAmount.GetHashCode();
         hashCode = (hashCode * 397) ^ TotalCreditsEarned;
         return(hashCode);
     }
 }
Пример #2
0
        public bool Equals(CreditsEarned other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

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

            return(BoostAmount == other.BoostAmount &&
                   PlayerRankAmount == other.PlayerRankAmount &&
                   Result == other.Result &&
                   SpartanRankModifier.Equals(other.SpartanRankModifier) &&
                   TimePlayedAmount.Equals(other.TimePlayedAmount) &&
                   TotalCreditsEarned == other.TotalCreditsEarned);
        }