< Summary

Information
Class: Renci.SshNet.Messages.Transport.KeyExchangeDhGroupExchangeRequest
Assembly: Renci.SshNet
File(s): \home\appveyor\projects\ssh-net\src\Renci.SshNet\Messages\Transport\KeyExchangeDhGroupExchangeRequest.cs
Line coverage
92%
Covered lines: 26
Uncovered lines: 2
Coverable lines: 28
Total lines: 91
Line coverage: 92.8%
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_Minimum()100%1100%
get_Preferred()100%1100%
get_Maximum()100%1100%
get_BufferCapacity()100%1100%
.ctor(...)100%1100%
LoadData()100%1100%
SaveData()100%1100%
Process(...)100%10%

File(s)

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Messages\Transport\KeyExchangeDhGroupExchangeRequest.cs

#LineLine coverage
 1namespace Renci.SshNet.Messages.Transport
 2{
 3    /// <summary>
 4    /// Represents SSH_MSG_KEX_DH_GEX_REQUEST message.
 5    /// </summary>
 6    [Message("SSH_MSG_KEX_DH_GEX_REQUEST", MessageNumber)]
 7    internal sealed class KeyExchangeDhGroupExchangeRequest : Message, IKeyExchangedAllowed
 8    {
 9        internal const byte MessageNumber = 34;
 10
 11        /// <summary>
 12        /// Gets the minimum size, in bits, of an acceptable group.
 13        /// </summary>
 14        /// <value>
 15        /// The minimum.
 16        /// </value>
 3317        public uint Minimum { get; private set; }
 18
 19        /// <summary>
 20        /// Gets the preferred size, in bits, of the group the server will send.
 21        /// </summary>
 22        /// <value>
 23        /// The preferred.
 24        /// </value>
 3325        public uint Preferred { get; private set; }
 26
 27        /// <summary>
 28        /// Gets the maximum size, in bits, of an acceptable group.
 29        /// </summary>
 30        /// <value>
 31        /// The maximum.
 32        /// </value>
 3333        public uint Maximum { get; private set; }
 34
 35        /// <summary>
 36        /// Gets the size of the message in bytes.
 37        /// </summary>
 38        /// <value>
 39        /// The size of the messages in bytes.
 40        /// </value>
 41        protected override int BufferCapacity
 42        {
 43            get
 1244            {
 1245                var capacity = base.BufferCapacity;
 1246                capacity += 4; // Minimum
 1247                capacity += 4; // Preferred
 1248                capacity += 4; // Maximum
 1249                return capacity;
 1250            }
 51        }
 52
 53        /// <summary>
 54        /// Initializes a new instance of the <see cref="KeyExchangeDhGroupExchangeRequest"/> class.
 55        /// </summary>
 56        /// <param name="minimum">The minimum.</param>
 57        /// <param name="preferred">The preferred.</param>
 58        /// <param name="maximum">The maximum.</param>
 1559        public KeyExchangeDhGroupExchangeRequest(uint minimum, uint preferred, uint maximum)
 1560        {
 1561            Minimum = minimum;
 1562            Preferred = preferred;
 1563            Maximum = maximum;
 1564        }
 65
 66        /// <summary>
 67        /// Called when type specific data need to be loaded.
 68        /// </summary>
 69        protected override void LoadData()
 370        {
 371            Minimum = ReadUInt32();
 372            Preferred = ReadUInt32();
 373            Maximum = ReadUInt32();
 374        }
 75
 76        /// <summary>
 77        /// Called when type specific data need to be saved.
 78        /// </summary>
 79        protected override void SaveData()
 1280        {
 1281            Write(Minimum);
 1282            Write(Preferred);
 1283            Write(Maximum);
 1284        }
 85
 86        internal override void Process(Session session)
 087        {
 088            throw new System.NotImplementedException();
 89        }
 90    }
 91}