Ejemplo n.º 1
0
        static void Main()
        {
            CoreCommandHandler coreCommandHandler = DependencyResolver.Container.Resolve <CoreCommandHandler>();

            string command = GetCommand();

            while (command != "exit")
            {
                coreCommandHandler.Handle(command);
                command = GetCommand();
            }
        }
Ejemplo n.º 2
0
        protected override Task ExecuteAsync(CancellationToken stoppingToken)
        {
            string command = GetCommand();

            while (command != "exit" && !stoppingToken.IsCancellationRequested)
            {
                coreCommandHandler.Handle(command);
                command = GetCommand();
            }

            System.Console.WriteLine("Click Ctrl+C");
            return(Task.CompletedTask);
        }