public IConnection GetConnection() { if (currConnection == null) { try { currConnection = factory.CreateConnection(); connectionStatus.OnConnectionSuccess(currConnection); BindConnectionEvent(); } catch (Exception e) { connectionStatus.OnBuildConnError(e.Message); } } return(currConnection); }