BalloonsPop.ConsoleUserInterface.Program.Main C# (CSharp) Метод

Main() приватный статический Метод

private static Main ( ) : void
Результат void
        private static void Main()
        {
            var kernel = new StandardKernel();

            LoadModules(kernel);

            var bundle = new CoreBundle(kernel);
            var ctx = new Context(kernel);

            // TODO: introduce a getUserNameCommand
            Console.WriteLine("Who are you?");
            ctx.PlayerName = Console.ReadLine();
            Console.Clear();

            var engine = new GnomEngine(ctx, bundle);

            engine.HandleUserInput("field");

            var view = GnomViewProvider.GetGnomView();
            var app = new GnomApp(view, view["restart"], new ConsoleManipulator(), x =>
            {
                if (x.PressedKeyInfo.Key == ConsoleKey.Escape)
                {
                    Console.SetCursorPosition(60, 25);
                    Environment.Exit(42);
                }
                else if (x.PressedKeyInfo.Key == ConsoleKey.Enter)
                {
                    engine.HandleUserInput((x.Target as IElement).Id);
                }
            });

            app.Start();
        }