< Summary

Information
Class: Renci.SshNet.Messages.Connection.ChannelWindowAdjustMessage
Assembly: Renci.SshNet
File(s): \home\appveyor\projects\ssh-net\src\Renci.SshNet\Messages\Connection\ChannelWindowAdjustMessage.cs
Line coverage
62%
Covered lines: 15
Uncovered lines: 9
Coverable lines: 24
Total lines: 73
Line coverage: 62.5%
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_BytesToAdd()100%1100%
get_BufferCapacity()100%10%
.ctor()100%1100%
.ctor(...)100%1100%
LoadData()100%1100%
SaveData()100%10%
Process(...)100%1100%

File(s)

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Messages\Connection\ChannelWindowAdjustMessage.cs

#LineLine coverage
 1namespace Renci.SshNet.Messages.Connection
 2{
 3    /// <summary>
 4    /// Represents SSH_MSG_CHANNEL_SUCCESS message.
 5    /// </summary>
 6    [Message("SSH_MSG_CHANNEL_WINDOW_ADJUST", 93)]
 7    public class ChannelWindowAdjustMessage : ChannelMessage
 8    {
 9        /// <summary>
 10        /// Gets number of bytes to add to the window.
 11        /// </summary>
 656012        public uint BytesToAdd { get; private set; }
 13
 14        /// <summary>
 15        /// Gets the size of the message in bytes.
 16        /// </summary>
 17        /// <value>
 18        /// The size of the messages in bytes.
 19        /// </value>
 20        protected override int BufferCapacity
 21        {
 22            get
 023            {
 024                var capacity = base.BufferCapacity;
 025                capacity += 4; // BytesToAdd
 026                return capacity;
 027            }
 28        }
 29
 30        /// <summary>
 31        /// Initializes a new instance of the <see cref="ChannelWindowAdjustMessage"/> class.
 32        /// </summary>
 327433        public ChannelWindowAdjustMessage()
 327434        {
 327435        }
 36
 37        /// <summary>
 38        /// Initializes a new instance of the <see cref="ChannelWindowAdjustMessage"/> class.
 39        /// </summary>
 40        /// <param name="localChannelNumber">The local channel number.</param>
 41        /// <param name="bytesToAdd">The bytes to add.</param>
 42        public ChannelWindowAdjustMessage(uint localChannelNumber, uint bytesToAdd)
 643            : base(localChannelNumber)
 644        {
 645            BytesToAdd = bytesToAdd;
 646        }
 47
 48        /// <summary>
 49        /// Called when type specific data need to be loaded.
 50        /// </summary>
 51        protected override void LoadData()
 327452        {
 327453            base.LoadData();
 54
 327455            BytesToAdd = ReadUInt32();
 327456        }
 57
 58        /// <summary>
 59        /// Called when type specific data need to be saved.
 60        /// </summary>
 61        protected override void SaveData()
 062        {
 063            base.SaveData();
 64
 065            Write(BytesToAdd);
 066        }
 67
 68        internal override void Process(Session session)
 327469        {
 327470            session.OnChannelWindowAdjustReceived(this);
 327471        }
 72    }
 73}