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
DefaultFailureConverterOptionsOptions 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
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 virtual Exception ToException(Failure failure, IPayloadConverter payloadConverter)
Parameters
failure
FailureFailure to convert.
payloadConverter
IPayloadConverterPayload converter to use if needed.
Returns
- Exception
Created exception.
ToFailure(Exception, IPayloadConverter)
Convert the given exception to a failure.
public virtual Failure ToFailure(Exception exception, IPayloadConverter payloadConverter)
Parameters
exception
ExceptionException to convert.
payloadConverter
IPayloadConverterPayload converter to use if needed.
Returns
- Failure
Created failure.