Exemple #1
0
        public async Task <Preview> PreviewsAsync(string path, string rev = null, string asTeamMember = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            var restResponse = await _requestExecuter.Execute(() => _requestGenerator.Previews(Options.AutoRoot, path, rev, asTeamMember), cancellationToken : cancellationToken).ConfigureAwait(false);

            var preview = new Preview
            {
                Content     = await restResponse.Content.ReadAsStreamAsync().ConfigureAwait(false),
                ContentType = restResponse.Content.Headers.ContentType.MediaType
            };

            return(preview);
        }
Exemple #2
0
 public async Task <Preview> PreviewsAsync(string path, string rev = null, string asTeamMember = null)
 {
     return(await _requestExecuter.Execute <Preview>(() => _requestGenerator.Previews(_options.Root, path, rev, asTeamMember)).ConfigureAwait(false));
 }