public double MaxRegionConsumation(string region) { double value = 0; bool isSuccess = false; do { try { value = _dataService.MaxRegionConsumation(region); isSuccess = true; } catch (Exception) { _isClientConnected = false; Connect(); } } while (!isSuccess); return(value); }