Interface ServiceAddress.IUnionMembers
- Namespace
- IceRpc
- Assembly
- IceRpc.dll
Provides the union members of ServiceAddress: the factory methods that create a service address from a variant, and the accessors to the variant it holds.
public interface ServiceAddress.IUnionMembers
Properties
HasValue
Gets a value indicating whether the service address holds a variant.
bool HasValue { get; }
Property Value
Value
Gets the variant held by the service address.
object? Value { get; }
Property Value
- object
The ServiceAddress.Ice or ServiceAddress.IceRpc variant, or null when the service address holds no variant.
Methods
Create(Ice)
Creates a service address that holds an ServiceAddress.Ice variant.
public static abstract ServiceAddress Create(ServiceAddress.Ice value)
Parameters
valueServiceAddress.IceThe variant.
Returns
- ServiceAddress
The new service address.
Create(IceRpc)
Creates a service address that holds an ServiceAddress.IceRpc variant.
public static abstract ServiceAddress Create(ServiceAddress.IceRpc value)
Parameters
valueServiceAddress.IceRpcThe variant.
Returns
- ServiceAddress
The new service address.
TryGetValue(out Ice)
Gets the ServiceAddress.Ice variant held by the service address.
bool TryGetValue(out ServiceAddress.Ice value)
Parameters
valueServiceAddress.IceThe variant, when this method returns true.
Returns
- bool
true when the service address holds an ServiceAddress.Ice variant; otherwise, false.
TryGetValue(out IceRpc)
Gets the ServiceAddress.IceRpc variant held by the service address.
bool TryGetValue(out ServiceAddress.IceRpc value)
Parameters
valueServiceAddress.IceRpcThe variant, when this method returns true.
Returns
- bool
true when the service address holds an ServiceAddress.IceRpc variant; otherwise, false.