Share via


ResolvedPort Struct

Definition

Represents a resolved port with information about whether it was allocated or explicitly specified.

public readonly struct ResolvedPort
type ResolvedPort = struct
Public Structure ResolvedPort
Inheritance
ResolvedPort

Properties

Name Description
IsAllocated

Gets a value indicating whether the port was dynamically allocated. When true, the target environment may choose to ignore this port and use its own allocation mechanism. When false, the port was explicitly specified and should be used as-is.

IsImplicit

Gets a value indicating whether the port was implicitly inferred from another value. When true, the port was derived (e.g., exposed port matching target port) rather than explicitly specified by the user.

Value

Gets the port number, or null if no port was resolved.

Methods

Name Description
Allocated(Int32)

Creates a ResolvedPort with an allocated port.

Explicit(Int32)

Creates a ResolvedPort with an explicitly specified port.

Implicit(Int32)

Creates a ResolvedPort with an implicitly inferred port.

None()

Creates a ResolvedPort with no port (null).

Operators

Name Description
Implicit(ResolvedPort to Nullable<Int32>)

Applies to