Exemplo n.º 1
0
        private async Task <bool> ExecuteTaskAddAsync(string url, string taskText)
        {
            var httpRequestMessage = ServiceHelper.GenerateAddOutlookTaskHttpRequest(url, taskText);
            var result             = await this.httpClient.SendAsync(httpRequestMessage);

            return(result.IsSuccessStatusCode);
        }
Exemplo n.º 2
0
        private async Task <bool> ExecuteTaskAddAsync(string url, string taskText)
        {
            var httpRequestMessage = ServiceHelper.GenerateAddOutlookTaskHttpRequest(url, taskText);
            var result             = await this.httpClient.SendAsync(httpRequestMessage);

            if (result.IsSuccessStatusCode)
            {
                return(true);
            }
            else
            {
                dynamic          responseContent  = JObject.Parse(await result.Content.ReadAsStringAsync());
                ServiceException serviceException = ServiceHelper.GenerateServiceException(responseContent);
                throw serviceException;
            }
        }