Assembly: OptimaJet.Workflow.FormsPlugin

Class SaveFormResult

OptimaJet.Workflow.Plugins.FormsPlugin.SaveFormResult

Represents the response of a form save operation.

public sealed class SaveFormResult : OneOfBase<SaveFormSuccess, ValidationError, SystemError>, IOneOf

Type Hierarchy

Properties

public ValidatedResultType ResultType { get; } #
The result type, i.e., success, validation error, or another error.
public bool IsSuccess { get; } #
True if form execution was successful.
public bool IsValidationError { get; } #
True if form execution failed due to a validation error.
public bool IsSystemError { get; } #
True if form execution failed due to an error other than a validation error.
public SaveFormSuccess AsSuccess { get; } #
Casts the form execution result as a success result.
public ValidationError AsValidationError { get; } #
Casts the form execution result as a validation error result.
public SystemError AsSystemError { get; } #
Casts the form execution result as a system error result.
public SaveFormSuccess? Success { get; } #
Returns the success result if it is successful; otherwise, returns null.
public SystemError? SystemError { get; } #
Returns the system error result if it is a system error; otherwise, returns null.
public ValidationError? ValidationError { get; } #
Returns the validation error result if it is a validation error; otherwise, returns null.

Methods

public static implicit operator SaveFormResult(SystemError systemError) #

Parameters

Name
Type
Description
systemError
SystemError

Returns

Type
Description
SaveFormResult
public static implicit operator SaveFormResult(ValidationError validationError) #

Parameters

Name
Type
Description
validationError
ValidationError

Returns

Type
Description
SaveFormResult
public static implicit operator SaveFormResult(SaveFormSuccess saveFormSuccess) #

Parameters

Name
Type
Description
saveFormSuccess
SaveFormSuccess

Returns

Type
Description
SaveFormResult
public static explicit operator SaveFormSuccess(SaveFormResult saveFormResult) #

Parameters

Name
Type
Description
saveFormResult
SaveFormResult

Returns

Type
Description
SaveFormSuccess
public static explicit operator ValidationError(SaveFormResult saveFormResult) #

Parameters

Name
Type
Description
saveFormResult
SaveFormResult

Returns

Type
Description
ValidationError
public static explicit operator SystemError(SaveFormResult saveFormResult) #

Parameters

Name
Type
Description
saveFormResult
SaveFormResult

Returns

Type
Description
SystemError