示例#1
0
        protected virtual void Dispose(bool isDisposing)
        {
            if (!isDisposing)
            {
                return;
            }

            if (_sessionPool != null)
            {
                _sessionPool.Dispose();
                _sessionPool = null;
            }
        }
示例#2
0
        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);
        }