Exemplo n.º 1
0
        public ReservaService(ILogger <ReservaService> logger, IOptions <RabbitMqConfiguration> rabbitMqOptions,
                              IOptions <ReservaClienteConfiguration> reservaClienteOptions, IEventHandler eventHandler,
                              IEventStoreHandler eventStoreHandler)
        {
            _logger                = logger;
            _rabbitMqOptions       = rabbitMqOptions;
            _reservaClienteOptions = reservaClienteOptions;
            _eventHandler          = eventHandler;
            _eventStoreHandler     = eventStoreHandler;

            _factory = new ConnectionFactory
            {
                HostName = _rabbitMqOptions.Value.Hostname,
                UserName = _rabbitMqOptions.Value.UserName,
                Password = _rabbitMqOptions.Value.Password
            };

            InitializeRabbitMqListener();
        }
Exemplo n.º 2
0
 public EventHandler(ILogger <EventHandler> logger, IEventStoreHandler eventStoreHandler)
 {
     this._logger       = logger;
     _eventStoreHandler = eventStoreHandler;
 }