# < 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

Method | Branch coverage | Cyclomatic complexity | Line coverage
--- | --- | --- | ---
.ctor(...) | 100% | 2 | 100%
get_OriginatorHost() | 100% | 1 | 100%
get_OriginatorPort() | 100% | 1 | 0%

# File(s)

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

| # | Line |  | Line coverage
--- | --- | --- | --- | ---
|  | `1` |  | `using System;`
|  | `2` |  | `using System.Net;`
|  | `3` |  | ``
|  | `4` |  | `namespace 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`
| 12 | `18` |  | `internal PortForwardEventArgs(string host, uint port)`
| 12 | `19` |  | `{`
| 12 | `20` |  | `if (host is null)`
| 3 | `21` |  | `{`
| 3 | `22` |  | `throw new ArgumentNullException(nameof(host));`
|  | `23` |  | `}`
|  | `24` |  | ``
| 9 | `25` |  | `port.ValidatePort("port");`
|  | `26` |  | ``
| 6 | `27` |  | `OriginatorHost = host;`
| 6 | `28` |  | `OriginatorPort = port;`
| 6 | `29` |  | `}`
|  | `30` |  | ``
|  | `31` |  | `/// <summary>`
|  | `32` |  | `/// Gets request originator host.`
|  | `33` |  | `/// </summary>`
| 6 | `34` |  | `public string OriginatorHost { get; }`
|  | `35` |  | ``
|  | `36` |  | `/// <summary>`
|  | `37` |  | `/// Gets request originator port.`
|  | `38` |  | `/// </summary>`
| 0 | `39` |  | `public uint OriginatorPort { get; }`
|  | `40` |  | `}`
|  | `41` |  | `}`

# Methods/Properties

.ctor(System.String,System.UInt32)
get_OriginatorHost()
get_OriginatorPort()