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); }
/// <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); }
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(); }
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 ); }