< Summary

Information
Class: Renci.SshNet.Messages.Connection.ExitStatusRequestInfo
Assembly: Renci.SshNet
File(s): \home\appveyor\projects\ssh-net\src\Renci.SshNet\Messages\Connection\ChannelRequest\ExitStatusRequestInfo.cs
Line coverage
56%
Covered lines: 13
Uncovered lines: 10
Coverable lines: 23
Total lines: 77
Line coverage: 56.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_ExitStatus()100%1100%
get_BufferCapacity()100%10%
.ctor()100%1100%
.ctor(...)100%1100%
LoadData()100%1100%
SaveData()100%10%

File(s)

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

#LineLine coverage
 1namespace Renci.SshNet.Messages.Connection
 2{
 3    /// <summary>
 4    /// Represents "exit-status" type channel request information.
 5    /// </summary>
 6    internal sealed class ExitStatusRequestInfo : RequestInfo
 7    {
 8        /// <summary>
 9        /// Channel request name.
 10        /// </summary>
 11        public const string Name = "exit-status";
 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 exit status number.
 26        /// </summary>
 245027        public uint ExitStatus { get; private set; }
 28
 29        protected override int BufferCapacity
 30        {
 31            get
 032            {
 033                var capacity = base.BufferCapacity;
 034                capacity += 4; // ExitStatus
 035                return capacity;
 036            }
 37        }
 38
 39        /// <summary>
 40        /// Initializes a new instance of the <see cref="ExitStatusRequestInfo"/> class.
 41        /// </summary>
 282842        public ExitStatusRequestInfo()
 282843        {
 282844            WantReply = false;
 282845        }
 46
 47        /// <summary>
 48        /// Initializes a new instance of the <see cref="ExitStatusRequestInfo"/> class.
 49        /// </summary>
 50        /// <param name="exitStatus">The exit status number.</param>
 51        public ExitStatusRequestInfo(uint exitStatus)
 2452            : this()
 2453        {
 2454            ExitStatus = exitStatus;
 2455        }
 56
 57        /// <summary>
 58        /// Called when type specific data need to be loaded.
 59        /// </summary>
 60        protected override void LoadData()
 168761        {
 168762            base.LoadData();
 63
 168764            ExitStatus = ReadUInt32();
 168765        }
 66
 67        /// <summary>
 68        /// Called when type specific data need to be saved.
 69        /// </summary>
 70        protected override void SaveData()
 071        {
 072            base.SaveData();
 73
 074            Write(ExitStatus);
 075        }
 76    }
 77}