예제 #1
0
        private IApprendaApiClient GetClient()
        {
            var client = _reportingService == null
                ? _apiClientFactory.GetV1Client()
                : _apiClientFactory.GetV1Client(_reportingService);

            return(client);
        }
예제 #2
0
        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);
        }