< Summary

Information
Class: Renci.SshNet.Sftp.SftpUploadAsyncResult
Assembly: Renci.SshNet
File(s): \home\appveyor\projects\ssh-net\src\Renci.SshNet\Sftp\SftpUploadAsyncResult.cs
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 47
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_IsUploadCanceled()100%1100%
get_UploadedBytes()100%1100%
.ctor(...)100%1100%
Update(...)100%1100%

File(s)

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

#LineLine coverage
 1using System;
 2
 3using Renci.SshNet.Common;
 4
 5namespace Renci.SshNet.Sftp
 6{
 7    /// <summary>
 8    /// Encapsulates the results of an asynchronous upload operation.
 9    /// </summary>
 10    public class SftpUploadAsyncResult : AsyncResult
 11    {
 12        /// <summary>
 13        /// Gets or sets a value indicating whether to cancel asynchronous upload operation.
 14        /// </summary>
 15        /// <value>
 16        /// <see langword="true"/> if upload operation to be canceled; otherwise, <see langword="false"/>.
 17        /// </value>
 18        /// <remarks>
 19        /// Upload operation will be canceled after finishing uploading current buffer.
 20        /// </remarks>
 168721        public bool IsUploadCanceled { get; set; }
 22
 23        /// <summary>
 24        /// Gets the number of uploaded bytes.
 25        /// </summary>
 168126        public ulong UploadedBytes { get; private set; }
 27
 28        /// <summary>
 29        /// Initializes a new instance of the <see cref="SftpUploadAsyncResult"/> class.
 30        /// </summary>
 31        /// <param name="asyncCallback">The async callback.</param>
 32        /// <param name="state">The state.</param>
 33        public SftpUploadAsyncResult(AsyncCallback asyncCallback, object state)
 2234            : base(asyncCallback, state)
 2235        {
 2236        }
 37
 38        /// <summary>
 39        /// Updates asynchronous operation status information.
 40        /// </summary>
 41        /// <param name="uploadedBytes">Number of uploaded bytes.</param>
 42        internal void Update(ulong uploadedBytes)
 164943        {
 164944            UploadedBytes = uploadedBytes;
 164945        }
 46    }
 47}