Пример #1
0
    public async Task <StreamInfo> GetSourceStreamInfoAsync()
    {
        var response = await FtpRequestRetriever.GetRequest(
            WebRequestMethods.Ftp.DownloadFile, _filePath, _credentials, _proxy)
                       .GetResponseAsync().ConfigureAwait(false);

        return(new StreamInfo(response.GetResponseStream(), response.ContentLength));
    }
Пример #2
0
 public async Task <Stream> GetDestinationStreamAsync()
 {
     return(await FtpRequestRetriever.GetRequest(
                WebRequestMethods.Ftp.UploadFile, _filePath, _credentials, _proxy)
            .GetRequestStreamAsync().ConfigureAwait(false));
 }