コード例 #1
0
 public async ValueTask Execute(IPublisherContext context)
 {
     try
     {
         await _pipeline.Execute(context);
     }
     catch (Exception e)
     {
         _logger.LogError(e, context.Message.ToString());
     }
 }
コード例 #2
0
 public async ValueTask Execute(IPublisherContext context)
 {
     var retryContext = new PublisherRetryContext(context);
     await _retryPolicy.ExecuteAsync(async() =>
     {
         try
         {
             await _pipeline.Execute(retryContext);
         }
         catch (Exception)
         {
             retryContext.Increment();
             throw;
         }
     });
 }
コード例 #3
0
 public async ValueTask Execute(IPublisherContext context)
 {
     using (await _limiter.WaitAsync())
         await _publisher.Execute(context);
 }