ContainerExposedPort Class
A container port that is exposed without being published to the host. It is metadata: the other containers of a network reach every port of the container, exposed or not.
public sealed class ContainerExposedPort : IEquatable<ContainerExposedPort>- Implements
Constructors
| Name | Description |
|---|---|
| ContainerExposedPort(int, ContainerPortProtocol) | A container port that is exposed without being published to the host. It is metadata: the other containers of a network reach every port of the container, exposed or not. |
ContainerExposedPort(int, ContainerPortProtocol)
ContainerExposedPort.csA container port that is exposed without being published to the host. It is metadata: the other containers of a network reach every port of the container, exposed or not.
public ContainerExposedPort(int Port, ContainerPortProtocol Protocol = ContainerPortProtocol.Tcp)Parameters
Portint- The port exposed inside the container.
ProtocolContainerPortProtocol- The transport protocol of the port.
Properties
| Name | Description |
|---|---|
| Port | Gets the port exposed inside the container. |
| Protocol | The transport protocol of the port. |
Protocol
ContainerExposedPort.csThe transport protocol of the port.
public ContainerPortProtocol Protocol { get; init; }Property value
Methods
| Name | Description |
|---|---|
| Deconstruct(int, ContainerPortProtocol) | |
| Equals(ContainerExposedPort?) | |
| Equals(object?) | |
| GetHashCode() | |
| ToString() |
Deconstruct(int, ContainerPortProtocol)
public void Deconstruct(out int Port, out ContainerPortProtocol Protocol)Parameters
PortintProtocolContainerPortProtocol
No documentation is available.
Equals overloads
Equals(ContainerExposedPort?)
public bool Equals(ContainerExposedPort? other)No documentation is available.
Equals(object?)
GetHashCode()
ToString()
Operators
| Name | Description |
|---|---|
| operator ==(ContainerExposedPort?, ContainerExposedPort?) | |
| operator !=(ContainerExposedPort?, ContainerExposedPort?) |
operator ==(ContainerExposedPort?, ContainerExposedPort?)
public static bool operator ==(ContainerExposedPort? left, ContainerExposedPort? right)No documentation is available.
operator !=(ContainerExposedPort?, ContainerExposedPort?)
public static bool operator !=(ContainerExposedPort? left, ContainerExposedPort? right)No documentation is available.