< Summary

Information
Class: Renci.SshNet.Common.PortForwardEventArgs
Assembly: Renci.SshNet
File(s): \home\appveyor\projects\ssh-net\src\Renci.SshNet\Common\PortForwardEventArgs.cs
Line coverage
90%
Covered lines: 10
Uncovered lines: 1
Coverable lines: 11
Total lines: 41
Line coverage: 90.9%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%2100%
get_OriginatorHost()100%1100%
get_OriginatorPort()100%10%

File(s)

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Common\PortForwardEventArgs.cs

#LineLine coverage
 1using System;
 2using System.Net;
 3
 4namespace Renci.SshNet.Common
 5{
 6    /// <summary>
 7    /// Provides data for <see cref="ForwardedPort.RequestReceived"/> event.
 8    /// </summary>
 9    public class PortForwardEventArgs : EventArgs
 10    {
 11        /// <summary>
 12        /// Initializes a new instance of the <see cref="PortForwardEventArgs"/> class.
 13        /// </summary>
 14        /// <param name="host">The host.</param>
 15        /// <param name="port">The port.</param>
 16        /// <exception cref="ArgumentNullException"><paramref name="host"/> is <see langword="null"/>.</exception>
 17        /// <exception cref="ArgumentOutOfRangeException"><paramref name="port" /> is not within <see cref="IPEndPoint.M
 1218        internal PortForwardEventArgs(string host, uint port)
 1219        {
 1220            if (host is null)
 321            {
 322                throw new ArgumentNullException(nameof(host));
 23            }
 24
 925            port.ValidatePort("port");
 26
 627            OriginatorHost = host;
 628            OriginatorPort = port;
 629        }
 30
 31        /// <summary>
 32        /// Gets request originator host.
 33        /// </summary>
 634        public string OriginatorHost { get; }
 35
 36        /// <summary>
 37        /// Gets request originator port.
 38        /// </summary>
 039        public uint OriginatorPort { get; }
 40    }
 41}