Exemplo n.º 1
0
        private void InitializeQueueListener(string queuePath)
        {
            _msmqListener = _msmqFactory.GetListener(queuePath, new[]
            {
                typeof(UpdateStatusMessage),
                typeof(UpdatePageTimeoutMessage)
            });

            _msmqListener.MessageReceived += OnMessageReceived;
            _msmqListener.Start();
        }
Exemplo n.º 2
0
        public bool Start(HostControl hostControl)
        {
            _logger.Info("The file control service is starting.");

            var queueName = _settingsProvider.GetMessageQueueName();
            var queuePath = MessageQueueHelper.GetQueuePath(queueName);

            _msmqListener = _msmqFactory.GetListener(queuePath, _messageTypes);
            _msmqListener.MessageReceived += OnMessageReceived;
            _msmqListener.Start();
            _commandSender.Start();

            _logger.Info("The file control service has started.");

            return(true);
        }