コード例 #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = CommendationLevelId.GetHashCode();
         hashCode = (hashCode * 397) ^ CommendationSource.GetHashCode();
         hashCode = (hashCode * 397) ^ Id.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)RewardSourceType;
         hashCode = (hashCode * 397) ^ SpartanRankSource.GetHashCode();
         return(hashCode);
     }
 }
コード例 #2
0
        public bool Equals(RewardSet other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

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

            return(CommendationLevelId.Equals(other.CommendationLevelId) &&
                   CommendationSource.Equals(other.CommendationSource) &&
                   Id.Equals(other.Id) &&
                   RewardSourceType == other.RewardSourceType &&
                   SpartanRankSource == other.SpartanRankSource);
        }