Exemple #1
0
 public async Task <bool> Handle(ChargePatientCommand request, CancellationToken cancellationToken)
 {
     return(await _policyWrap.ExecuteAsync(async() =>
     {
         var result = await _customer.Charge(300);
         if (result == false)
         {
             throw new HttpRequestException("This is a fake request Exception");
         }
         return true;
     }));
 }