Beispiel #1
0
        private async Task <string> CreateTaskFolderAsync(string taskFolderName)
        {
            var httpRequestMessage = ServiceHelper.GenerateCreateTaskFolderHttpRequest(GraphBaseUrl + "taskFolders", taskFolderName);
            var result             = await this.httpClient.SendAsync(httpRequestMessage);

            dynamic responseContent = JObject.Parse(await result.Content.ReadAsStringAsync());

            if (result.IsSuccessStatusCode)
            {
                return((string)responseContent.id);
            }
            else
            {
                ServiceException serviceException = ServiceHelper.GenerateServiceException(responseContent);
                throw serviceException;
            }
        }