Table of Contents

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

codec IPayloadCodec

Codec to use.

failure Failure

Failure 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

codec IPayloadCodec

Codec to use.

payload Payload

Payload to decode.

Returns

Task<Payload>

Decoded payload.

EncodeFailureAsync(IPayloadCodec, Failure)

Encode all payloads in the given failure in place.

public static Task EncodeFailureAsync(this IPayloadCodec codec, Failure failure)

Parameters

codec IPayloadCodec

Codec to use.

failure Failure

Failure 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

codec IPayloadCodec

Codec to use.

payload Payload

Payload to encode.

Returns

Task<Payload>

Encoded payload.