< Summary

Information
Class: Renci.SshNet.Messages.Connection.RequestInfo
Assembly: Renci.SshNet
File(s): \home\appveyor\projects\ssh-net\src\Renci.SshNet\Messages\Connection\ChannelRequest\RequestInfo.cs
Line coverage
100%
Covered lines: 12
Uncovered lines: 0
Coverable lines: 12
Total lines: 58
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_WantReply()100%1100%
get_BufferCapacity()100%1100%
LoadData()100%1100%
SaveData()100%1100%

File(s)

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

#LineLine coverage
 1using Renci.SshNet.Common;
 2
 3namespace Renci.SshNet.Messages.Connection
 4{
 5    /// <summary>
 6    /// Represents type specific information for channel request.
 7    /// </summary>
 8    public abstract class RequestInfo : SshData
 9    {
 10        /// <summary>
 11        /// Gets the name of the request.
 12        /// </summary>
 13        /// <value>
 14        /// The name of the request.
 15        /// </value>
 16        public abstract string RequestName { get; }
 17
 18        /// <summary>
 19        /// Gets or sets a value indicating whether reply message is needed.
 20        /// </summary>
 21        /// <value>
 22        /// <see langword="true"/> if reply message is needed; otherwise, <see langword="false"/>.
 23        /// </value>
 4236924        public bool WantReply { get; protected set; }
 25
 26        /// <summary>
 27        /// Gets the size of the message in bytes.
 28        /// </summary>
 29        /// <value>
 30        /// The size of the messages in bytes.
 31        /// </value>
 32        protected override int BufferCapacity
 33        {
 34            get
 170635            {
 170636                var capacity = base.BufferCapacity;
 170637                capacity += 1; // WantReply
 170638                return capacity;
 170639            }
 40        }
 41
 42        /// <summary>
 43        /// Called when type specific data need to be loaded.
 44        /// </summary>
 45        protected override void LoadData()
 169846        {
 169847            WantReply = ReadBoolean();
 169848        }
 49
 50        /// <summary>
 51        /// Called when type specific data need to be saved.
 52        /// </summary>
 53        protected override void SaveData()
 172254        {
 172255            Write(WantReply);
 172256        }
 57    }
 58}