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

NameDescription
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.cs

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 ContainerExposedPort(int Port, ContainerPortProtocol Protocol = ContainerPortProtocol.Tcp)

Parameters

Port int
The port exposed inside the container.
Protocol ContainerPortProtocol
The transport protocol of the port.

Properties

NameDescription
PortGets the port exposed inside the container.
ProtocolThe transport protocol of the port.

Gets the port exposed inside the container.

public int Port { get; init; }

Property value

int

The transport protocol of the port.

public ContainerPortProtocol Protocol { get; init; }

Property value

ContainerPortProtocol

Methods

NameDescription
Deconstruct(int, ContainerPortProtocol)
Equals(ContainerExposedPort?)
Equals(object?)
GetHashCode()
ToString()

Deconstruct(int, ContainerPortProtocol)

public void Deconstruct(out int Port, out ContainerPortProtocol Protocol)

Parameters

Port int
Protocol ContainerPortProtocol

No documentation is available.

Equals overloads

Equals(ContainerExposedPort?)

public bool Equals(ContainerExposedPort? other)
Parameters
other ContainerExposedPort?
Returns

bool

No documentation is available.

Equals(object?)

public override bool Equals(object? obj)
Parameters
obj object?
Returns

bool

No documentation is available.

GetHashCode()

public override int GetHashCode()

Returns

int

No documentation is available.

ToString()

public override string ToString()

Returns

string

No documentation is available.

Operators

NameDescription
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.