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
uriUriAn absolute URI with the
icerpcscheme, such asicerpc://host:port/path?transport=quic&alt-server=host2oricerpc:/path.
Exceptions
- ArgumentException
Thrown when
uriis 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
otherServiceAddress.IceRpcThe service address to compare with this service address.
Returns
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.