public async Task <string> GetFileContentAsync(string branch, string path) { this.IsPending = true; try { if (string.IsNullOrWhiteSpace(branch)) { throw new ArgumentNullException(nameof(branch)); } if (string.IsNullOrWhiteSpace(path)) { throw new ArgumentNullException(nameof(path)); } using (var client = new GitLabClient(this.GitOptions)) { var file = await client.GetFileAsync(this.SelectedProjectId.Value, branch, path); var fileBlob = await client.GetFileBlobAsync(this.SelectedProjectId.Value, file.BlobId); var fileContent = Encoding.UTF8.GetString(Convert.FromBase64String(fileBlob.Content)); return(fileContent); } } catch (Exception ex) { this.errorService.AddError(ex); return(null); } finally { this.IsPending = false; } }