Example #1
0
        public void Run()
        {
            EAExport = new EventAggregator();

            bootstrapper = new ClientBootstrap(this);
            bootstrapper.ConfigureAggregateCatalog(); // ConfigureAggregateCatalog()
            bootstrapper.InitializeModules();

            if (CommandSvc != null)
            {
                // Initialize the command-line
                CommandSvc.Initialize();

                // Initialize the proxy
                CliReceiver.Initialize();

                // Start listening for input on UDP-Socket
                CliReceiver.Start();

                // Start commands - if they have dependencies during startup, at this time they are available
                Console.WriteLine(">");

                CommandSvc.Start();

                // Wait for input
                while (true)
                {
                    string line = Console.ReadLine();
                    CommandSvc.NewInput(line);
                    Console.Write(CommandSvc.Output);
                }
            }
            else
            {
                string msg = "CommandSvc nicht verfügbar - Das Programm wird beendet";
                Log.Error(msg);
                Console.WriteLine("Press key to finish");
                Console.Read();
            }
        }