Ejemplo n.º 1
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 :)

                hashCode = hashCode * 59 + HttpStatus.GetHashCode();

                hashCode = hashCode * 59 + ErrorCode.GetHashCode();
                if (Description != null)
                {
                    hashCode = hashCode * 59 + Description.GetHashCode();
                }
                if (DocumentationLink != null)
                {
                    hashCode = hashCode * 59 + DocumentationLink.GetHashCode();
                }
                if (AdditionalInfo != null)
                {
                    hashCode = hashCode * 59 + AdditionalInfo.GetHashCode();
                }
                return(hashCode);
            }
        }
 public override int GetHashCode() {
   int hash = 1;
   if (errorTypeCase_ == ErrorTypeOneofCase.HttpStatus) hash ^= HttpStatus.GetHashCode();
   if (percentage_ != null) hash ^= Percentage.GetHashCode();
   hash ^= (int) errorTypeCase_;
   if (_unknownFields != null) {
     hash ^= _unknownFields.GetHashCode();
   }
   return hash;
 }
Ejemplo n.º 3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Percent != 0)
            {
                hash ^= Percent.GetHashCode();
            }
            if (errorTypeCase_ == ErrorTypeOneofCase.HttpStatus)
            {
                hash ^= HttpStatus.GetHashCode();
            }
            hash ^= (int)errorTypeCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }