< Summary

Information
Class: Renci.SshNet.Sftp.SftpDownloadAsyncResult
Assembly: Renci.SshNet
File(s): \home\appveyor\projects\ssh-net\src\Renci.SshNet\Sftp\SftpDownloadAsyncResult.cs
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 46
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
get_IsDownloadCanceled()100%1100%
get_DownloadedBytes()100%1100%
.ctor(...)100%1100%
Update(...)100%1100%

File(s)

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Sftp\SftpDownloadAsyncResult.cs

#LineLine coverage
 1using System;
 2using Renci.SshNet.Common;
 3
 4namespace Renci.SshNet.Sftp
 5{
 6    /// <summary>
 7    /// Encapsulates the results of an asynchronous download operation.
 8    /// </summary>
 9    public class SftpDownloadAsyncResult : AsyncResult
 10    {
 11        /// <summary>
 12        /// Gets or sets a value indicating whether to cancel asynchronous download operation.
 13        /// </summary>
 14        /// <value>
 15        /// <see langword="true"/> if download operation to be canceled; otherwise, <see langword="false"/>.
 16        /// </value>
 17        /// <remarks>
 18        /// Download operation will be canceled after finishing uploading current buffer.
 19        /// </remarks>
 166020        public bool IsDownloadCanceled { get; set; }
 21
 22        /// <summary>
 23        /// Gets the number of downloaded bytes.
 24        /// </summary>
 168525        public ulong DownloadedBytes { get; private set; }
 26
 27        /// <summary>
 28        /// Initializes a new instance of the <see cref="SftpDownloadAsyncResult"/> class.
 29        /// </summary>
 30        /// <param name="asyncCallback">The async callback.</param>
 31        /// <param name="state">The state.</param>
 32        public SftpDownloadAsyncResult(AsyncCallback asyncCallback, object state)
 2533            : base(asyncCallback, state)
 2534        {
 2535        }
 36
 37        /// <summary>
 38        /// Updates asynchronous operation status information.
 39        /// </summary>
 40        /// <param name="downloadedBytes">Number of downloaded bytes.</param>
 41        internal void Update(ulong downloadedBytes)
 164942        {
 164943            DownloadedBytes = downloadedBytes;
 164944        }
 45    }
 46}