Пример #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            try
            {
                var application = new TradeApp();
                var initiator   = new SessionStarter(application, new SettingsProviderMock());

                initiator.Start();
                application.Run();
                initiator.Stop();
            }
            catch (System.Exception e)
            {
                Console.WriteLine(e.Message);
                Console.WriteLine(e.StackTrace);
            }
        }
Пример #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            try
            {
                IApplication app      = new AcceptorApp();
                var          acceptor = new SessionStarter(app, new SettingsProviderMock());

                acceptor.Start();
                Console.WriteLine("press <enter> to quit");
                Console.Read();
                acceptor.Stop();
            }
            catch (System.Exception e)
            {
                Console.WriteLine(e.Message);
                Console.WriteLine(e.StackTrace);
            }
        }