Table of Contents

Struct IceObjectProxy

Namespace
IceRpc.Ice
Assembly
IceRpc.Ice.dll

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

invoker IInvoker

The invocation pipeline of the proxy.

serviceAddress ServiceAddress

The service address. null is equivalent to the default service address (protocol: ice, path: DefaultServicePath).

encodeOptions IceEncodeOptions

The 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

invoker IInvoker

The invocation pipeline of the proxy.

serviceAddressUri Uri

A URI that represents a service address.

encodeOptions IceEncodeOptions

The 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

string

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

IceEncodeOptions

Invoker

Gets or initializes the invocation pipeline of this proxy.

public required IInvoker Invoker { get; init; }

Property Value

IInvoker

ServiceAddress

Gets or initializes the address of the remote service.

public ServiceAddress ServiceAddress { get; init; }

Property Value

ServiceAddress

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

features IFeatureCollection

The features of this invocation.

cancellationToken CancellationToken

A cancellation token that receives the cancellation requests.

Returns

Task<string[]>

The Ice type IDs of all these interfaces, sorted alphabetically.

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

id string

The Ice type ID of the interface to test against.

features IFeatureCollection

The features of this invocation.

cancellationToken CancellationToken

A cancellation token that receives the cancellation requests.

Returns

Task<bool>

True when the target service implements this interface; otherwise, false.

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

features IFeatureCollection

The features of this invocation.

cancellationToken CancellationToken

A 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.