コード例 #1
0
 public void Dispatch(object?arg, Action <AsyncOperationResult> callback)
 {
     _actionHandle = new AsyncEventArgs(() =>
     {
         try
         {
             _result = AsyncOperationResult.Success(_action(arg));
             callback(_result);
         }
         catch (Exception ex)
         {
             _result = AsyncOperationResult.Failure(ex);
             callback(_result);
         }
     });
     Async.Dispatch(_actionHandle);
 }