Ejemplo n.º 1
0
 public int GetHashCodeWithMembers()
 {
     unchecked
     {
         var hashCode = 397;
         hashCode = (hashCode * 397) ^ (Name?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Processor?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ Cores.GetHashCode();
         hashCode = (hashCode * 397) ^ (Manufacturer?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Memory?.GetHashCodeWithMembers() ?? 0);
         hashCode = (hashCode * 397) ^ Version.GetHashCode();
         return(hashCode);
     }
 }
Ejemplo n.º 2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id.Length != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (Cores != 0L)
            {
                hash ^= Cores.GetHashCode();
            }
            if (Memory != 0L)
            {
                hash ^= Memory.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }