You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using Service.Execute.SwapException;
|
|
|
|
|
|
|
|
|
|
namespace Service.Execute;
|
|
|
|
|
|
|
|
|
|
public class StateResult
|
|
|
|
|
{
|
|
|
|
|
public static readonly StateResult Cancel = new() { SwappingState = SwappingState.Canceled };
|
|
|
|
|
public SwappingState SwappingState { get; set; }
|
|
|
|
|
public Object Model { get; set; }
|
|
|
|
|
|
|
|
|
|
public static StateResult Exception(ExceptionReason exceptionReason, string msg)
|
|
|
|
|
{
|
|
|
|
|
return new StateResult()
|
|
|
|
|
{
|
|
|
|
|
SwappingState = SwappingState.Exception,
|
|
|
|
|
Model = new ExceptionData()
|
|
|
|
|
{
|
|
|
|
|
ExceptionReason = exceptionReason,
|
|
|
|
|
Msg = msg
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|