Esempio n. 1
0
 public async Task <Stream> HeadAsync()
 {
     using (var client = new VideoClient())
     {
         return(await client
                .StreamAsync(this)
                .ConfigureAwait(false));
     }
 }
Esempio n. 2
0
 public async Task <byte[]> GetBytesAsync()
 {
     using (var client = new VideoClient())
     {
         return(await client
                .GetBytesAsync(this)
                .ConfigureAwait(false));
     }
 }
Esempio n. 3
0
 private async Task <long?> GetContentLength(Query query)
 {
     if (query.TryGetValue("clen", out string clen))
     {
         return(long.Parse(clen));
     }
     using (var client = new VideoClient())
     {
         return(await client.GetContentLengthAsync(uri));
     }
 }