コード例 #1
0
		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;
		}
コード例 #2
0
 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);
 }