Ejemplo n.º 1
0
        public RabbitHostedService(ILogger log, IDispatchEvent eventDispatcher, RabbitServiceConfiguration serviceConfiguration)
        {
            _log = log;
            _serviceConfiguration = serviceConfiguration;

            _log.Debug("Connecting to RabbitMQ on {rabbitUri}", serviceConfiguration.Uri);

            _connection = new ConnectionFactory()
            {
                Uri = new Uri(_serviceConfiguration.Uri),
                AutomaticRecoveryEnabled = true,
            }.CreateConnection();

            _internal = new RabbitService(log.ForContext <RabbitService>(), _connection, eventDispatcher, _serviceConfiguration.Publisher.Exchange);
        }
Ejemplo n.º 2
0
 public SuperVillainService(IDispatchEvent eventDispatcher)
 {
     _eventDispatcher = eventDispatcher;
 }
Ejemplo n.º 3
0
 public EventReceiver(IDispatchEvent eventDispatcher)
 {
     _eventDispatcher = eventDispatcher;
 }
Ejemplo n.º 4
0
 public EventDispatchBehavior(ILifetimeScope scope, IDispatchEvent next)
 {
     _scope = scope;
     _next  = next;
 }
Ejemplo n.º 5
0
 public SuperheroService(IDispatchEvent eventDispatcher)
 {
     _eventDispatcher = eventDispatcher;
 }
Ejemplo n.º 6
0
 public FeatDestinyService(IDispatchEvent eventDipatcher)
 {
     _eventDipatcher = eventDipatcher;
 }
Ejemplo n.º 7
0
 public EventStopwatchBehavior(ILogger log, IDispatchEvent next)
 {
     _log  = log;
     _next = next;
 }