public virtual IConnection Get(string connectionName = null) { connectionName = connectionName ?? Connections.DefaultConnectionName; return(_connections.GetOrAdd( connectionName, () => ConnectionFactoryWrapper.CreateConnection(connectionName) )); }
public DefaultConnectionPool(ConnectionFactoryWrapper connectionFactoryWrapper) { ConnectionFactoryWrapper = connectionFactoryWrapper; _connections = new ConcurrentDictionary <string, IConnection>(); }