private void EstablishConnection() { if (connection != null) { return; } try { connection = createConnection(); connection.Open(); } catch (Exception exception) { Close(); throw new CannotConnectException(string.Format("Cannot connect to {0}", configuration.GetHost()), exception); } }