private void EnsureConnectionLeaseTimeout(Uri endpoint) { var key = new UriCacheKey(endpoint); _alreadySeenAddresses.TryAdd(key, key); ServicePointManager.FindServicePoint(endpoint).ConnectionLeaseTimeout = (int)Constants.ConnectionLifeTime.TotalMilliseconds; }
/// <summary> /// Determines whether this instance and another specified <see cref="UriCacheKey"></see> object are considered to be the same. /// </summary> /// <param name="obj">The <see cref="UriCacheKey"></see> to compare to this instance.</param> public bool Equals(UriCacheKey obj) => _uri == obj._uri;