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
responseIncomingResponseThe incoming response.
requestOutgoingRequestThe outgoing request.
senderIIceProxyThe proxy that sent the request.
decodeReturnValueDecodeFunc<T>A function that decodes the return value.
defaultActivatorIActivatorThe activator to use when the activator provided by the request's IIceFeature is null.
cancellationTokenCancellationTokenA 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
TThe 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
responseIncomingResponseThe incoming response.
requestOutgoingRequestThe outgoing request.
senderIIceProxyThe proxy that sent the request.
defaultActivatorIActivatorThe activator to use when the activator provided by the request's IIceFeature is null.
cancellationTokenCancellationTokenA 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.