public async Task <string> GetGitHubFileContentsAsync( string path, GitHubBranch branch) { try { GitHubContents file = await GetGitHubFileAsync(path, branch.Project, $"heads/{branch.Name}"); return(ClientHelpers.FromBase64(file.Content)); } catch (HttpFailureResponseException ex) when(ex.HttpStatusCode == HttpStatusCode.NotFound) { return(null); } }
public async Task <string> GetGitHubFileContentsAsync( string path, GitHubProject project, string @ref) { try { GitHubContents file = await GetGitHubFileAsync(path, project, @ref); return(ClientHelpers.FromBase64(file.Content)); } catch (HttpFailureResponseException ex) when(ex.HttpStatusCode == HttpStatusCode.NotFound) { return(null); } }