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