Table of Contents

Class ServiceAddress.IceRpc

Namespace
IceRpc
Assembly
IceRpc.dll

The address of a service reachable with the icerpc protocol.

public sealed record ServiceAddress.IceRpc : IEquatable<ServiceAddress.IceRpc>
Inheritance
ServiceAddress.IceRpc
Implements
Inherited Members

Constructors

IceRpc()

Constructs an icerpc service address with default values.

public IceRpc()

IceRpc(Uri)

Constructs an icerpc service address from a URI.

public IceRpc(Uri uri)

Parameters

uri Uri

An absolute URI with the icerpc scheme, such as icerpc://host:port/path?transport=quic&alt-server=host2 or icerpc:/path.

Exceptions

ArgumentException

Thrown when uri is not a valid icerpc service address URI.

Properties

AltServerAddresses

Gets or initializes the secondary server addresses of this service address.

public ImmutableList<ServerAddress> AltServerAddresses { get; init; }

Property Value

ImmutableList<ServerAddress>

The secondary server addresses of this service address, all icerpc server addresses. Defaults to Empty.

Path

Gets or initializes the path of this service address.

public string Path { get; init; }

Property Value

string

The path of this service address. Defaults to /.

ServerAddress

Gets or initializes the main server address of this service address.

public ServerAddress? ServerAddress { get; init; }

Property Value

ServerAddress?

The main server address, an icerpc server address, or null if this service address has no server address.

Methods

Equals(IceRpc?)

Determines whether the specified service address is equal to this service address.

public bool Equals(ServiceAddress.IceRpc? other)

Parameters

other ServiceAddress.IceRpc

The service address to compare with this service address.

Returns

bool

true if the two service addresses are equal; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for this service address.

ToString()

Converts this service address into a string.

public override string ToString()

Returns

string

The URI of this service address.

ToUri()

Converts this service address into a URI.

public Uri ToUri()

Returns

Uri

The URI of this service address.