public void Process(NonBlockingChannel statusChannel,
                            ITaskable uiTask)
        {
            var inboundChannel = new NonBlockingChannel();
            var baristaOutboundChannel = new EnumerableChannel<IMessage>();
            var customerOutboundChannel = new EnumerableChannel<IMessage>();
            var registerOutboundChannel = new EnumerableChannel<IMessage>();
            var abandonedMessages = new NonBlockingChannel();

            var messageRouter = new OrderingProcessMessageRouter(
                inboundChannel,
                baristaOutboundChannel,
                customerOutboundChannel,
                registerOutboundChannel,
                abandonedMessages,
                statusChannel);

            var baristaActor = new BaristaActor(inboundChannel, baristaOutboundChannel);
            var customerActor = new CustomerActor(inboundChannel, customerOutboundChannel);
            var registerActor = new RegisterActor(inboundChannel, registerOutboundChannel);

            //ThreadPool.QueueUserWorkItem(x => messageRouter.Process());
            //ThreadPool.QueueUserWorkItem(x => baristaActor.Process());
            //ThreadPool.QueueUserWorkItem(x => customerActor.Process());
            //ThreadPool.QueueUserWorkItem(x => registerActor.Process());
            //ThreadPool.QueueUserWorkItem(x => uiTask.Process());

            new Thread(messageRouter.Process).Start();
            new Thread(baristaActor.Process).Start();
            new Thread(customerActor.Process).Start();
            new Thread(registerActor.Process).Start();
            new Thread(uiTask.Process).Start();
        }
 public ProcessViewUpdateTask(ProcessView viewModel,
                              NonBlockingChannel statusChannel,
                              Dispatcher dispatcher)
 {
     _ViewModel = viewModel;
     _StatusChannel = statusChannel;
     _Dispatcher = dispatcher;
 }
        void App_Startup(object sender, StartupEventArgs e)
        {
            var viewModel = new ProcessView();
            var statusChannel = new NonBlockingChannel();
            var uiTask = new ProcessViewUpdateTask(viewModel, statusChannel, Dispatcher);

            var viewer = new Window1();
            viewer.DataContext = viewModel;
            viewer.Show();

            var orchestration = new StarbucksOrchestration();
            orchestration.Process(statusChannel, uiTask);
        }