Ejemplo n.º 1
0
 private static void ReadUserCommand(FileCommandParser commandParser)
 {
     Console.WriteLine("Input your command:");
     try
     {
         HandleInput(commandParser);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
Ejemplo n.º 2
0
        public static void Main()
        {
            ServiceProvider        _serviceProvider = ConfigureServiceProvider();
            FileCommandParser      commandParser    = _serviceProvider.GetRequiredService <FileCommandParser>();
            AuthorizeCommandParser authorizeParser  = _serviceProvider.GetRequiredService <AuthorizeCommandParser>();

            Console.WriteLine("Runned");
            Authorize(authorizeParser);
            while (true)
            {
                ReadUserCommand(commandParser);
            }
        }