Table of Contents

Struct CellEndpointDescriptor

Namespace
KernLab.Cell.Contracts
Assembly
KernLab.Cell.Contracts.dll

端点描述符(§4/§8——CELL_ENDPOINT=<载体>:<地址>;握手前 stdout 唯一合法输出)。

★ 描述符形态:tcp:127.0.0.1:52311/uds:/tmp/cell-x.sock/shm:cell-<世代>-<id>/ np:cell-<pid>-<id>/inproc:<名字>。载体替换对协议与使用方零感知——上层只见本结构。

★ 解析纪律:严格形态,不猜不修——失败即 false/抛(fail-fast 优于隐式降级,Tier 判例)。 载体段大小写不敏感(操作员友好),归一化输出小写;地址段逐字保真。

public readonly struct CellEndpointDescriptor : IEquatable<CellEndpointDescriptor>
Implements
Inherited Members

Constructors

CellEndpointDescriptor(CellEndpointScheme, string)

构造(生产口——载体实现自报用;address 非空校验在此)。

public CellEndpointDescriptor(CellEndpointScheme scheme, string address)

Parameters

scheme CellEndpointScheme
address string

Properties

Address

载体限定地址(逐字保真——host:port/路径/段名)。

public string Address { get; }

Property Value

string

Scheme

载体类型。

public CellEndpointScheme Scheme { get; }

Property Value

CellEndpointScheme

Methods

Equals(CellEndpointDescriptor)

等值(载体+地址逐字——同描述符即同端点)。

public bool Equals(CellEndpointDescriptor other)

Parameters

other CellEndpointDescriptor

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Parse(string)

解析描述符——失败抛 FormatException(配置错误绝不静默,LoomHttpOptions 判例同款)。

public static CellEndpointDescriptor Parse(string text)

Parameters

text string

Returns

CellEndpointDescriptor

ToString()

归一化描述符文本(载体段小写;回灌 TryParse 恒真)。

public override string ToString()

Returns

string

TryParse(string?, out CellEndpointDescriptor)

解析描述符(严格形态:载体段识别+地址段非空校验;tcp 另校验端口段 1–65535)。

public static bool TryParse(string? text, out CellEndpointDescriptor descriptor)

Parameters

text string
descriptor CellEndpointDescriptor

Returns

bool

Operators

operator ==(CellEndpointDescriptor, CellEndpointDescriptor)

等值运算符(与 Equals 同一语义——CA2231)。

public static bool operator ==(CellEndpointDescriptor left, CellEndpointDescriptor right)

Parameters

left CellEndpointDescriptor
right CellEndpointDescriptor

Returns

bool

operator !=(CellEndpointDescriptor, CellEndpointDescriptor)

不等运算符(与 Equals 取反同一语义——CA2231)。

public static bool operator !=(CellEndpointDescriptor left, CellEndpointDescriptor right)

Parameters

left CellEndpointDescriptor
right CellEndpointDescriptor

Returns

bool