internal static RoutingTableManager NewRoutingTableManager( IRoutingTable routingTable, IClusterConnectionPoolManager poolManager, IInitialServerAddressProvider addressProvider = null) { if (addressProvider == null) { addressProvider = new InitialServerAddressProvider(InitialUri, new PassThroughServerAddressResolver()); } return(new RoutingTableManager(addressProvider, new Dictionary <string, string>(), routingTable, poolManager, null)); }
internal static RoutingTableManager NewRoutingTableManager( IRoutingTable routingTable, IClusterConnectionPoolManager poolManager, IDiscovery discovery = null, IInitialServerAddressProvider addressProvider = null, IDriverLogger logger = null) { if (addressProvider == null) { addressProvider = new InitialServerAddressProvider(InitialUri, new PassThroughServerAddressResolver()); } if (discovery == null) { discovery = Mock.Of <IDiscovery>(); } return(new RoutingTableManager(addressProvider, discovery, routingTable, poolManager, logger)); }