Table of Contents

Class ServiceAddress.Ice

Namespace
IceRpc
Assembly
IceRpc.dll

The address of a service reachable with the ice protocol.

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

Constructors

Ice()

Constructs an ice service address with default values.

public Ice()

Ice(Uri)

Constructs an ice service address from a URI.

public Ice(Uri uri)

Parameters

uri Uri

An absolute URI with the ice scheme, such as ice://host:port/category/name?transport=tcp#facet or ice:/name?adapter-id=foo.

Exceptions

ArgumentException

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

Properties

AdapterId

Gets or initializes the adapter ID of this service address.

public string AdapterId { get; init; }

Property Value

string

The adapter ID, or an empty string if this service address has no adapter ID. It is always empty when ServerAddress is not null. Defaults to an empty string.

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 ice server addresses. Defaults to Empty.

Fragment

Gets or initializes the fragment.

public string Fragment { get; init; }

Property Value

string

The fragment of this service address, which corresponds to the Ice facet. Defaults to an empty string.

Path

Gets or initializes the path of this service address.

public string Path { get; init; }

Property Value

string

The path of this service address, /category/name or /name for an Ice identity. 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 ice server address, or null if this service address has no server address.

Methods

Equals(Ice?)

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

public bool Equals(ServiceAddress.Ice? other)

Parameters

other ServiceAddress.Ice

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.