/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { var hash = 41; // Suitable nullity checks etc, of course :) if (Op != null) { hash = hash * 59 + Op.GetHashCode(); } if (Id != null) { hash = hash * 59 + Id.GetHashCode(); } if (ErrorMessage != null) { hash = hash * 59 + ErrorMessage.GetHashCode(); } if (ErrorCode != null) { hash = hash * 59 + ErrorCode.GetHashCode(); } if (ConnectionId != null) { hash = hash * 59 + ConnectionId.GetHashCode(); } if (ConnectionClosed != null) { hash = hash * 59 + ConnectionClosed.GetHashCode(); } if (StatusCode != null) { hash = hash * 59 + StatusCode.GetHashCode(); } return(hash); } }