/// <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 (ProxyEnabled != null) { hashCode = hashCode * 59 + ProxyEnabled.GetHashCode(); } if (ProxyHost != null) { hashCode = hashCode * 59 + ProxyHost.GetHashCode(); } if (ProxyPort != null) { hashCode = hashCode * 59 + ProxyPort.GetHashCode(); } if (ProxyUser != null) { hashCode = hashCode * 59 + ProxyUser.GetHashCode(); } if (ProxyPassword != null) { hashCode = hashCode * 59 + ProxyPassword.GetHashCode(); } if (ProxyExceptions != null) { hashCode = hashCode * 59 + ProxyExceptions.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = RequestTimeout.GetHashCode(); hashCode = (hashCode * 397) ^ PingTimeout.GetHashCode(); hashCode = (hashCode * 397) ^ KeepAliveTime; hashCode = (hashCode * 397) ^ KeepAliveInterval; hashCode = (hashCode * 397) ^ Pipelined.GetHashCode(); hashCode = (hashCode * 397) ^ HttpCompression.GetHashCode(); hashCode = (hashCode * 397) ^ (Headers?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (ProxyAddress?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (ProxyUsername?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (ProxyPassword?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ DisableAutomaticProxyDetection.GetHashCode(); hashCode = (hashCode * 397) ^ (BasicAuthorizationCredentials?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (ConnectionSettings?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (MemoryStreamFactory?.GetHashCode() ?? 0); return(hashCode); } }