Beispiel #1
0
 public IPromise <Response> MakeRemoteRequest(Request request)
 {
     if (request == null)
     {
         throw new ArgumentNullException(nameof(request));
     }
     try
     {
         var task    = _executor.Send(request);
         var promise = task.ToPromise();
         return(promise);
     }
     catch (Exception ex)
     {
         var rejectedPromise = new Promise <Response>();
         rejectedPromise.Reject(ex);
         return(rejectedPromise);
     }
 }