< Summary

Information
Class: Renci.SshNet.Sftp.Requests.SftpUnblockRequest
Assembly: Renci.SshNet
File(s): \home\appveyor\projects\ssh-net\src\Renci.SshNet\Sftp\Requests\SftpUnblockRequest.cs
Line coverage
80%
Covered lines: 24
Uncovered lines: 6
Coverable lines: 30
Total lines: 64
Line coverage: 80%
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_SftpMessageType()100%1100%
get_Handle()100%1100%
get_Offset()100%1100%
get_Length()100%1100%
get_BufferCapacity()100%1100%
.ctor(...)100%1100%
LoadData()100%10%
SaveData()100%1100%

File(s)

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

#LineLine coverage
 1using System;
 2using Renci.SshNet.Sftp.Responses;
 3
 4namespace Renci.SshNet.Sftp.Requests
 5{
 6    internal sealed class SftpUnblockRequest : SftpRequest
 7    {
 8        public override SftpMessageTypes SftpMessageType
 9        {
 1810            get { return SftpMessageTypes.Unblock; }
 11        }
 12
 1813        public byte[] Handle { get; private set; }
 14
 1215        public ulong Offset { get; private set; }
 16
 1217        public ulong Length { get; private set; }
 18
 19        /// <summary>
 20        /// Gets the size of the message in bytes.
 21        /// </summary>
 22        /// <value>
 23        /// The size of the messages in bytes.
 24        /// </value>
 25        protected override int BufferCapacity
 26        {
 27            get
 328            {
 329                var capacity = base.BufferCapacity;
 330                capacity += 4; // Handle length
 331                capacity += Handle.Length; // Handle
 332                capacity += 8; // Offset
 333                capacity += 8; // Length
 334                return capacity;
 335            }
 36        }
 37
 38        public SftpUnblockRequest(uint protocolVersion, uint requestId, byte[] handle, ulong offset, ulong length, Actio
 939            : base(protocolVersion, requestId, statusAction)
 940        {
 941            Handle = handle;
 942            Offset = offset;
 943            Length = length;
 944        }
 45
 46        protected override void LoadData()
 047        {
 048            base.LoadData();
 49
 050            Handle = ReadBinary();
 051            Offset = ReadUInt64();
 052            Length = ReadUInt64();
 053        }
 54
 55        protected override void SaveData()
 356        {
 357            base.SaveData();
 58
 359            WriteBinaryString(Handle);
 360            Write(Offset);
 361            Write(Length);
 362        }
 63    }
 64}