private IApprendaApiClient GetClient() { var client = _reportingService == null ? _apiClientFactory.GetV1Client() : _apiClientFactory.GetV1Client(_reportingService); return(client); }
public async Task <IApprendaApiClient> GetClient() { if (_currentApiClient == null) { _currentApiClient = _reportingService == null ? _clientFactory.GetV1Client() : _clientFactory.GetV1Client(_reportingService); } if (string.IsNullOrEmpty(_sessionToken)) { _sessionToken = await _currentApiClient.Login(_login.UserName, _login.Password); } return(_currentApiClient); }