Class PayloadCodecExtensions
- Namespace
- Temporalio.Converters
- Assembly
- Temporalio.dll
Extension methods for IPayloadCodec.
public static class PayloadCodecExtensions
- Inheritance
-
PayloadCodecExtensions
- Inherited Members
Methods
DecodeFailureAsync(IPayloadCodec, Failure)
Decode all payloads in the given failure in place.
public static Task DecodeFailureAsync(this IPayloadCodec codec, Failure failure)
Parameters
codecIPayloadCodecCodec to use.
failureFailureFailure to decode.
Returns
- Task
Task for completion.
DecodeSingleAsync(IPayloadCodec, Payload)
Single-value form of DecodeAsync(IReadOnlyCollection<Payload>). The multi-value form should be used in multi-value situations since the output arity can change compared to input. This is only for cases where there is only ever one payload.
public static Task<Payload> DecodeSingleAsync(this IPayloadCodec codec, Payload payload)
Parameters
codecIPayloadCodecCodec to use.
payloadPayloadPayload to decode.
Returns
EncodeFailureAsync(IPayloadCodec, Failure)
Encode all payloads in the given failure in place.
public static Task EncodeFailureAsync(this IPayloadCodec codec, Failure failure)
Parameters
codecIPayloadCodecCodec to use.
failureFailureFailure to encode.
Returns
- Task
Task for completion.
EncodeSingleAsync(IPayloadCodec, Payload)
Single-value form of EncodeAsync(IReadOnlyCollection<Payload>). The multi-value form should be used in multi-value situations since the output arity can change compared to input. This is only for cases where there is only ever one payload.
public static Task<Payload> EncodeSingleAsync(this IPayloadCodec codec, Payload payload)
Parameters
codecIPayloadCodecCodec to use.
payloadPayloadPayload to encode.