public HostConnectionPool(Host host, Configuration config, ISerializer serializer, IObserverFactory observerFactory) { _host = host; _host.Down += OnHostDown; _host.Up += OnHostUp; _host.DistanceChanged += OnDistanceChanged; _config = config ?? throw new ArgumentNullException(nameof(config)); _poolingOptions = config.GetOrCreatePoolingOptions(serializer.ProtocolVersion); _maxRequestsPerConnection = _poolingOptions.GetMaxRequestsPerConnection(); _serializer = serializer; _observerFactory = observerFactory; _timer = config.Timer; _reconnectionSchedule = config.Policies.ReconnectionPolicy.NewSchedule(); _expectedConnectionLength = 1; }