Exemple #1
0
        public async void Execute(HttpConnection connection)
        {
            AssignedTimestamp = Stopwatch.GetTimestamp();
            Connection        = connection;

            try
            {
                await connection.CopyHttpChunkToAsync(Transfer, Url, FilePosition, Length).ConfigureAwait(false);

                Completed = true;
                _taskCompletionSource.TrySetResult(true);
            }
            catch (Exception x)
            {
                Logger.Error("Async copy failed {0} {1}", x.Message, x.StackTrace);
                _taskCompletionSource.TrySetResult(false);
            }
        }