internal SqlConnectionPoolKey(string connectionString, SqlCredential credential, string accessToken, ServerCertificateValidationCallback serverCertificateValidationCallback, ClientCertificateRetrievalCallback clientCertificateRetrievalCallback, SqlClientOriginalNetworkAddressInfo originalNetworkAddressInfo) : base(connectionString) { Debug.Assert(_credential == null || _accessToken == null, "Credential and AccessToken can't have the value at the same time."); _credential = credential; _accessToken = accessToken; _serverCertificateValidationCallback = serverCertificateValidationCallback; _clientCertificateRetrievalCallback = clientCertificateRetrievalCallback; _originalNetworkAddressInfo = originalNetworkAddressInfo; CalculateHashCode(); }
public override bool Equals(object other) { SqlClientOriginalNetworkAddressInfo otherAddress = other as SqlClientOriginalNetworkAddressInfo; if (otherAddress == null) { return(false); } if (otherAddress._address != _address) { return(false); } if (_isFromDataSecurityProxy != otherAddress._isFromDataSecurityProxy) { return(false); } return(true); }