示例#1
0
        /// <summary>
        /// Override GetHashCode for dish
        /// </summary>
        /// <returns></returns>
        public override int GetHashCode()
        {
            int hashCode = 256195580;

            hashCode = hashCode * -1521134295 + Id.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Name);

            hashCode = hashCode * -1521134295 + Popularity.GetHashCode();
            hashCode = hashCode * -1521134295 + IdType.GetHashCode();
            return(hashCode);
        }
示例#2
0
文件: Key.cs 项目: i-Asset/basyx
 public override int GetHashCode()
 {
     unchecked
     {
         var result = 0;
         result = (result * 397) ^ IdType.GetHashCode();
         result = (result * 397) ^ Type.GetHashCode();
         result = (result * 397) ^ (Local ? 1 : 0);
         return(result);
     }
 }
示例#3
0
 public override int GetHashCode() => _id.GetHashCode() ^ _info.GetHashCode();