コード例 #1
0
 public BaseRabbitMqConsumer(IOptionsSnapshot <RabbitMqConfig> options
                             , IHostApplicationLifetime appLifetime
                             , ILogger <dynamic> logger)
 {
     _appLifetime = appLifetime;
     _connection  = RabbitMqConnection.GetInstance(options, logger).Connection;
     _channel     = _connection.CreateModel();
     _logger      = logger;
 }
コード例 #2
0
 public RabbitMqProducer(IOptionsSnapshot <RabbitMqConfig> options, ILogger <RabbitMqProducer> logger)
 {
     _logger  = logger;
     _channel = RabbitMqConnection.GetInstance(options, logger).Connection.CreateModel();
 }