Exemplo n.º 1
0
        private TopFolderResponse GetTopFolders(string projId)
        {
            IRestResponse     response = _hubsApi.GetTopFolders(projId);
            TopFolderResponse content  = JsonConvert.DeserializeObject <TopFolderResponse>(response.Content);

            return(content);
        }
        private TopFolderResponse GetTopFolders(string projId)
        {
            IRestResponse response = _hubsApi.GetTopFolders(projId);

            //error message if project couldn´t reache
            if (!response.IsSuccessful)
            {
                Util.LogError($"Project can not be activated!\n" +
                              $"Rename the Project and try again!\n");
                throw new Exception($"Project can not be activated!\n" +
                                    $"Try again! If the same error occurs ->Rename the project");
            }

            TopFolderResponse content = JsonConvert.DeserializeObject <TopFolderResponse>(response.Content);

            return(content);
        }