Пример #1
0
 public async Task StopAsync(CancellationToken cancellationToken)
 {
     MQConnection.Dispose();
     await Task.CompletedTask;
 }
Пример #2
0
 public MQHostedService(MQConnection rabbitMQConnection, ILogger <MQHostedService> logger)
 {
     MQConnection = rabbitMQConnection;
     Logger       = logger;
 }
Пример #3
0
 public async Task StartAsync(CancellationToken cancellationToken)
 {
     MQConnection.Connect();
     await Task.CompletedTask;
 }