/// <summary>
 /// Initializes a new instance of the <see cref="InterfaceEngineEventHandler"/> class.
 /// </summary>
 /// <param name="configuration">
 /// The configuration.
 /// </param>
 /// <param name="transformer">
 /// The transformer.
 /// </param>
 /// <param name="messageStoreService">
 /// The message store service.
 /// </param>
 /// <param name="subscriptionService">
 /// The subscription service.
 /// </param>
 public InterfaceEngineEventHandler(
     IRealtimeConfiguration configuration,
     IInterfaceEngineMessageTransformer transformer,
     IMessageStoreService messageStoreService,
     IRealtimeSubscriptionService subscriptionService)
 {
     this.transformer         = transformer;
     this.messageStoreService = messageStoreService;
     this.subscriptionService = subscriptionService;
     this.configuration       = configuration;
     this.connectionFactory   =
         new ConnectionFactory {
         Uri = new Uri(this.configuration.MessageBrokerSettings.AmqpUri)
     };
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MessageReceiveWorker"/> class.
        /// </summary>
        /// <param name="logger">
        /// The logger.
        /// </param>
        /// <param name="configuration">
        /// The configuration.
        /// </param>
        /// <param name="eventHandler">
        /// The event handler for callback for processing incoming messages.
        /// </param>
        public MessageReceiveWorker(
            ILogger <MessageReceiveWorker> logger,
            IRealtimeConfiguration configuration,
            IInterfaceEngineEventHandler eventHandler)
        {
            Guard.ArgumentNotNull(logger, nameof(logger));

            this.logger            = logger;
            this.configuration     = configuration;
            this.eventHandler      = eventHandler;
            this.connectionFactory =
                new ConnectionFactory {
                Uri = new Uri(this.configuration.MessageBrokerSettings.AmqpUri)
            };
        }