Struct IceObjectProxy
Implements IIceObject by making invocations on a remote IceRPC service.
This remote service must implement Ice interface ::Ice::Object.
[IceTypeId("::Ice::Object")]
public readonly record struct IceObjectProxy : IIceObject, IIceProxy, IEquatable<IceObjectProxy>
- Implements
- Inherited Members
- Extension Methods
Constructors
IceObjectProxy()
Constructs a proxy that uses the default service address: its protocol is ice
and its path is DefaultServicePath.
public IceObjectProxy()
IceObjectProxy(IInvoker, ServiceAddress?, IceEncodeOptions?)
Constructs a proxy from an invoker, a service address and encode options.
[SetsRequiredMembers]
public IceObjectProxy(IInvoker invoker, ServiceAddress? serviceAddress = null, IceEncodeOptions? encodeOptions = null)
Parameters
invokerIInvokerThe invocation pipeline of the proxy.
serviceAddressServiceAddressThe service address. null is equivalent to the default service address (protocol:
ice, path: DefaultServicePath).encodeOptionsIceEncodeOptionsThe encode options, used to customize the encoding of request payloads.
IceObjectProxy(IInvoker, Uri, IceEncodeOptions?)
Constructs a proxy from an invoker, a service address URI and encode options.
[SetsRequiredMembers]
public IceObjectProxy(IInvoker invoker, Uri serviceAddressUri, IceEncodeOptions? encodeOptions = null)
Parameters
invokerIInvokerThe invocation pipeline of the proxy.
serviceAddressUriUriA URI that represents a service address.
encodeOptionsIceEncodeOptionsThe encode options, used to customize the encoding of request payloads.
Fields
DefaultServicePath
Represents the default path for IceRPC services that implement Ice interface
::Ice::Object.
public const string DefaultServicePath = "/Ice.Object"
Field Value
Properties
EncodeOptions
Gets or initializes the encode options, used to customize the encoding of payloads created from this proxy.
public IceEncodeOptions? EncodeOptions { get; init; }
Property Value
Invoker
Gets or initializes the invocation pipeline of this proxy.
public required IInvoker Invoker { get; init; }
Property Value
ServiceAddress
Gets or initializes the address of the remote service.
public ServiceAddress ServiceAddress { get; init; }
Property Value
Methods
IceIdsAsync(IFeatureCollection?, CancellationToken)
Gets the Ice type IDs of all the interfaces implemented by the target service.
public Task<string[]> IceIdsAsync(IFeatureCollection? features = null, CancellationToken cancellationToken = default)
Parameters
featuresIFeatureCollectionThe features of this invocation.
cancellationTokenCancellationTokenA cancellation token that receives the cancellation requests.
Returns
Exceptions
- DispatchException
Thrown when the dispatch of the operation failed. This exception is provided through the returned task; it's never thrown synchronously.
IceIsAAsync(string, IFeatureCollection?, CancellationToken)
Tests whether the target service implements the specified interface.
public Task<bool> IceIsAAsync(string id, IFeatureCollection? features = null, CancellationToken cancellationToken = default)
Parameters
idstringThe Ice type ID of the interface to test against.
featuresIFeatureCollectionThe features of this invocation.
cancellationTokenCancellationTokenA cancellation token that receives the cancellation requests.
Returns
Exceptions
- DispatchException
Thrown when the dispatch of the operation failed. This exception is provided through the returned task; it's never thrown synchronously.
IcePingAsync(IFeatureCollection?, CancellationToken)
Pings the service.
public Task IcePingAsync(IFeatureCollection? features = null, CancellationToken cancellationToken = default)
Parameters
featuresIFeatureCollectionThe features of this invocation.
cancellationTokenCancellationTokenA cancellation token that receives the cancellation requests.
Returns
- Task
A task that completes when the response is received.
Exceptions
- DispatchException
Thrown when the dispatch of the operation failed. This exception is provided through the returned task; it's never thrown synchronously.