protected virtual void Dispose(bool isDisposing) { if (!isDisposing) { return; } if (_sessionPool != null) { _sessionPool.Dispose(); _sessionPool = null; } }
internal Driver(Uri uri, IAuthToken authToken, Config config) { Throw.ArgumentNullException.IfNull(uri, nameof(uri)); Throw.ArgumentNullException.IfNull(authToken, nameof(authToken)); Throw.ArgumentNullException.IfNull(config, nameof(config)); if (uri.Port == -1) { var builder = new UriBuilder(uri.Scheme, uri.Host, 7687); uri = builder.Uri; } Uri = uri; _sessionPool = new SessionPool(uri, authToken, config?.Logger, config); }