File size: 825 Bytes
fab29d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using System.IO;
using System.Threading.Tasks;

namespace VersOne.Epub.Environment
{
    /// <summary>
    /// Provides methods for downloading remote content files.
    /// </summary>
    public interface IContentDownloader
    {
        /// <summary>
        /// Starts downloading the remote content file.
        /// </summary>
        /// <param name="url">The absolute URI of the remote content file.</param>
        /// <param name="userAgent">The value for the <c>User-Agent</c> header of the HTTP request.</param>
        /// <returns>
        /// A task that represents the asynchronous download operation. The value of the TResult parameter contains the readable stream for the content of the remote content file.
        /// </returns>
        Task<Stream> DownloadAsync(string url, string userAgent);
    }
}