public IConnection GetConsumeConnection() { //note: The purpose is there so that we/users can add more advanced connection managers in the future lock (connectionFactory) { return connectionConsume ?? (connectionConsume = new PersistentConnection(connectionFactory, connectionConfiguration.RetryDelay,"Consume")); } }
public IConnection GetAdministrationConnection() { //note: The purpose is there so that we/users can add more advanced connection managers in the future lock (connectionFactory) { return(connectionAdministration ?? (connectionAdministration = new PersistentConnection(connectionFactory, connectionConfiguration.RetryDelay))); } }
public IConnection GetConnection(ConnectionPurpose purpose) { //note: The purpose is there so that we/users can add more advanced connection managers in the future lock (connectionFactory) { if (connectionFailed) { throw connectionFailedReason; } return(connection ?? (connection = new PersistentConnection(connectionFactory, connectionConfiguration.RetryDelay))); } }