< Summary

Information
Class: Renci.SshNet.Messages.Connection.WindowChangeRequestInfo
Assembly: Renci.SshNet
File(s): \home\appveyor\projects\ssh-net\src\Renci.SshNet\Messages\Connection\ChannelRequest\WindowChangeRequestInfo.cs
Line coverage
10%
Covered lines: 4
Uncovered lines: 34
Coverable lines: 38
Total lines: 113
Line coverage: 10.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_RequestName()100%10%
get_Columns()100%10%
get_Rows()100%10%
get_Width()100%10%
get_Height()100%10%
get_BufferCapacity()100%10%
.ctor()100%1100%
.ctor(...)100%10%
LoadData()100%10%
SaveData()100%10%

File(s)

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

#LineLine coverage
 1namespace Renci.SshNet.Messages.Connection
 2{
 3    /// <summary>
 4    /// Represents "window-change" type channel request information.
 5    /// </summary>
 6    internal sealed class WindowChangeRequestInfo : RequestInfo
 7    {
 8        /// <summary>
 9        /// Channe request name.
 10        /// </summary>
 11        public const string Name = "window-change";
 12
 13        /// <summary>
 14        /// Gets the name of the request.
 15        /// </summary>
 16        /// <value>
 17        /// The name of the request.
 18        /// </value>
 19        public override string RequestName
 20        {
 021            get { return Name; }
 22        }
 23
 24        /// <summary>
 25        /// Gets the columns.
 26        /// </summary>
 027        public uint Columns { get; private set; }
 28
 29        /// <summary>
 30        /// Gets the rows.
 31        /// </summary>
 032        public uint Rows { get; private set; }
 33
 34        /// <summary>
 35        /// Gets the width.
 36        /// </summary>
 037        public uint Width { get; private set; }
 38
 39        /// <summary>
 40        /// Gets the height.
 41        /// </summary>
 042        public uint Height { get; private set; }
 43
 44        /// <summary>
 45        /// Gets the size of the message in bytes.
 46        /// </summary>
 47        /// <value>
 48        /// The size of the messages in bytes.
 49        /// </value>
 50        protected override int BufferCapacity
 51        {
 52            get
 053            {
 054                var capacity = base.BufferCapacity;
 055                capacity += 4; // Columns
 056                capacity += 4; // Rows
 057                capacity += 4; // Width
 058                capacity += 4; // Height
 059                return capacity;
 060            }
 61        }
 62
 63        /// <summary>
 64        /// Initializes a new instance of the <see cref="WindowChangeRequestInfo"/> class.
 65        /// </summary>
 280466        public WindowChangeRequestInfo()
 280467        {
 280468            WantReply = false;
 280469        }
 70
 71        /// <summary>
 72        /// Initializes a new instance of the <see cref="WindowChangeRequestInfo"/> class.
 73        /// </summary>
 74        /// <param name="columns">The columns.</param>
 75        /// <param name="rows">The rows.</param>
 76        /// <param name="width">The width.</param>
 77        /// <param name="height">The height.</param>
 78        public WindowChangeRequestInfo(uint columns, uint rows, uint width, uint height)
 079            : this()
 080        {
 081            Columns = columns;
 082            Rows = rows;
 083            Width = width;
 084            Height = height;
 085        }
 86
 87        /// <summary>
 88        /// Called when type specific data need to be loaded.
 89        /// </summary>
 90        protected override void LoadData()
 091        {
 092            base.LoadData();
 93
 094            Columns = ReadUInt32();
 095            Rows = ReadUInt32();
 096            Width = ReadUInt32();
 097            Height = ReadUInt32();
 098        }
 99
 100        /// <summary>
 101        /// Called when type specific data need to be saved.
 102        /// </summary>
 103        protected override void SaveData()
 0104        {
 0105            base.SaveData();
 106
 0107            Write(Columns);
 0108            Write(Rows);
 0109            Write(Width);
 0110            Write(Height);
 0111        }
 112    }
 113}