Table of Contents

Class IncomingResponseExtensions

Namespace
IceRpc.Ice.Operations
Assembly
IceRpc.Ice.dll

Provides extension methods for IncomingResponse to decode its Ice-encoded payload.

public static class IncomingResponseExtensions
Inheritance
IncomingResponseExtensions
Inherited Members

Methods

DecodeReturnValueAsync<T>(IncomingResponse, OutgoingRequest, IIceProxy, DecodeFunc<T>, IActivator, CancellationToken)

Decodes a response payload.

public static ValueTask<T> DecodeReturnValueAsync<T>(this IncomingResponse response, OutgoingRequest request, IIceProxy sender, DecodeFunc<T> decodeReturnValue, IActivator defaultActivator, CancellationToken cancellationToken = default)

Parameters

response IncomingResponse

The incoming response.

request OutgoingRequest

The outgoing request.

sender IIceProxy

The proxy that sent the request.

decodeReturnValue DecodeFunc<T>

A function that decodes the return value.

defaultActivator IActivator

The activator to use when the activator provided by the request's IIceFeature is null.

cancellationToken CancellationToken

A cancellation token that receives the cancellation requests.

Returns

ValueTask<T>

A value task that holds the operation's return value. This value task is faulted and holds a IceException when the status code is ApplicationError.

Type Parameters

T

The type of the return value.

Exceptions

DispatchException

Thrown when the status code of the response is greater than ApplicationError.

DecodeVoidReturnValueAsync(IncomingResponse, OutgoingRequest, IIceProxy, IActivator, CancellationToken)

Verifies that an Ice-encoded response payload carries no return value or only tagged return values.

public static ValueTask DecodeVoidReturnValueAsync(this IncomingResponse response, OutgoingRequest request, IIceProxy sender, IActivator defaultActivator, CancellationToken cancellationToken = default)

Parameters

response IncomingResponse

The incoming response.

request OutgoingRequest

The outgoing request.

sender IIceProxy

The proxy that sent the request.

defaultActivator IActivator

The activator to use when the activator provided by the request's IIceFeature is null.

cancellationToken CancellationToken

A cancellation token that receives the cancellation requests.

Returns

ValueTask

A value task representing the asynchronous completion of the operation. This value task is faulted and holds a IceException when the status code is ApplicationError.

Exceptions

DispatchException

Thrown when the status code of the response is greater than ApplicationError.