MarinKos89
4/18/2019 - 6:54 AM

getFileContent

        public string GetFileContent(DevOpsFileInformation result)
        {
            string fileContent;
            //two different kinds of projects- GIT & TFVC
            if(result.path.StartsWith("$"))
            {
                fileContent = WebVisit.GetURL($"{_url}/{result.project.name}/_apis/tfvc/items?path={result.path}&api-version={_apiVersion}");
            }
            else
            {
                fileContent = WebVisit.GetURL($"{_url}/{result.project.name}/_apis/git/repositories/{result.repository.id}/items?path={result.path}&api-version={_apiVersion}");
            }

            return fileContent;

        }