Example #1
0
 public override int GetHashCode()
 {
     //Uid优先为HashCode, Tid次之(有的对象是单例的,也就是说Tid对应唯一对象)
     if (Uid != 0)
     {
         return(Uid.GetHashCode());
     }
     return(Tid.GetHashCode());
 }
Example #2
0
        public override int GetHashCode()
        {
            var hashCode = -229983936;

            hashCode = hashCode * -1521134295 + base.GetHashCode();
            hashCode = hashCode * -1521134295 + Tid.GetHashCode();
            hashCode = hashCode * -1521134295 + LanguageCode.GetHashCode();
            return(hashCode);
        }
Example #3
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (Tid != null)
         {
             hashCode = hashCode * 59 + Tid.GetHashCode();
         }
         if (Message != null)
         {
             hashCode = hashCode * 59 + Message.GetHashCode();
         }
         return(hashCode);
     }
 }
Example #4
0
 public override int GetHashCode()
 {
     return(Tid.GetHashCode());
 }