Beispiel #1
0
 public Task StartAsync(CancellationToken cancellationToken)
 {
     try
     {
         logger.LogInformation("{ServiceName} starting...", ServiceName);
         messageBusListenerBuilder.Build().StartListening();
     }
     catch (Exception ex)
     {
         logger.LogError(ex, "Error when {ServiceName} starting", ServiceName);
     }
     return(Task.CompletedTask);
 }
Beispiel #2
0
 public Task StartAsync(CancellationToken cancellationToken)
 {
     logger.LogInformation("EventListenerHostedService Starting...");
     messageBusListenerBuilder.Build().StartListening();
     return(Task.CompletedTask);
 }