コード例 #1
0
        public async Task <bool> PostActionAsync <TJsonObject>(string uri, TJsonObject data, string exceptionMessage) where TJsonObject : class
        {
            var isSuccess = false;

            try
            {
                isSuccess = await _requestProvider.DoPostAsync <TJsonObject>(uri, data);
            }
            catch (InternetConnectionException)
            {
                throw;
            }
            catch (AuthenticationException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw new DataRepositoryException(exceptionMessage, ex);
            }

            return(isSuccess);
        }