Ejemplo n.º 1
0
 public RabbitQueueListener(IChannelProxy proxy, IDispatcher dispatch, RabbitEndpoint endpoint)
 {
     Serializer = Assimilate.GetInstanceOf(endpoint.SerializerType) as IMessageSerializer;
     Loop       = new EventLoop();
     Loop.Start(8);
     Running        = true;
     Proxy          = proxy;
     Dispatch       = dispatch;
     RabbitEndpoint = endpoint;
     proxy.InitConsumer(this);
 }
Ejemplo n.º 2
0
        /// <inheritdoc cref="IApp.Start"/>
        public void Start(Window mainWindow)
        {
            if (eventLoop.Running)
            {
                throw new InvalidOperationException("The main message loop is already running in this thread");
            }

            if (string.IsNullOrWhiteSpace(applicationName))
            {
                ApplicationName = mainWindow.Title;
            }
            mainWindow.Show();
            Application.MainWindow = mainWindow;
            PrepareInvalidateScreen(mainWindow);
            eventLoop.Start(InputAction);
        }
Ejemplo n.º 3
0
        public void Start()
        {
            if (_shuttingDown)
            {
                _logger.Warn("Cannot start TaskManager, as shutdown is in progress.");
                return;
            }
            if (_started)
            {
                return;
            }

            _started = true;

            // Start event loop
            _eventLoop = Dependencies.DependencyInjector.Current.Resolve <IEventLoop>();
            _eventLoop.Start();

            // Load and execute tasks
            Run();
        }
Ejemplo n.º 4
0
 public RabbitQueueListener( IChannelProxy proxy, IDispatcher dispatch, RabbitEndpoint endpoint )
 {
     Serializer = Assimilate.GetInstanceOf(endpoint.SerializerType) as IMessageSerializer;
     Loop = new EventLoop();
     Loop.Start( 8 );
     Running = true;
     Proxy = proxy;
     Dispatch = dispatch;
     RabbitEndpoint = endpoint;
     proxy.InitConsumer( this );
 }