Table of Contents

Class DefaultFailureConverter

Namespace
Temporalio.Converters
Assembly
Temporalio.dll

Default implementation of IFailureConverter.

public class DefaultFailureConverter : IFailureConverter
Inheritance
DefaultFailureConverter
Implements
Derived
Inherited Members

Constructors

DefaultFailureConverter()

Initializes a new instance of the DefaultFailureConverter class.

public DefaultFailureConverter()

DefaultFailureConverter(DefaultFailureConverterOptions)

Initializes a new instance of the DefaultFailureConverter class.

protected DefaultFailureConverter(DefaultFailureConverterOptions options)

Parameters

options DefaultFailureConverterOptions

Options for the failure converter.

Remarks

This is protected because payload converters are referenced as class types, not instances, so only subclasses would call this.

Properties

Options

Gets the options this converter was created with.

public DefaultFailureConverterOptions Options { get; }

Property Value

DefaultFailureConverterOptions

Remarks

Callers should never mutate this. Rather they should subclass the failure converter and pass a different value into the protected constructor.

Methods

ToException(Failure, IPayloadConverter)

Convert the given failure to an exception.

public Exception ToException(Failure failure, IPayloadConverter payloadConverter)

Parameters

failure Failure

Failure to convert.

payloadConverter IPayloadConverter

Payload converter to use if needed.

Returns

Exception

Created exception.

ToFailure(Exception, IPayloadConverter)

Convert the given exception to a failure.

public Failure ToFailure(Exception exception, IPayloadConverter payloadConverter)

Parameters

exception Exception

Exception to convert.

payloadConverter IPayloadConverter

Payload converter to use if needed.

Returns

Failure

Created failure.