public bool TryFail(int statuscode, TaskErrorEnum error, string description) { if (!_machine.CanFire(Transition.Fail)) { return false; } _machine.Fire (Transition.Fail); StatusCode = statuscode; Error = (int)error; ErrorDescription = description; LastModified = DateTime.Now; return true; }
public bool TryFail(int statuscode, TaskErrorEnum error, string description) { if (!_machine.CanFire(Transition.Fail)) { return(false); } _machine.Fire(Transition.Fail); StatusCode = statuscode; Error = (int)error; ErrorDescription = description; LastModified = DateTime.Now; return(true); }