Beispiel #1
0
        public void RunProgram()
        {
            if (_args.Length > 0)
            {
                try
                {
                    argsList = _parser.Parse();
                }
                catch (InvalidArgumentsException)
                {
                    Console.WriteLine("Specified arguments were not valid.");
                    Console.ReadKey();
                }

                var consoleProgram = new GrepConsoleProgram(argsList);
            }
            else
            {
                // TODO: Otworzyć graficzny interfejs
            }
        }
 public ArgumentParser(string[] args)
 {
     _args          = args;
     _argsList      = new ArgsList();
     foundArgsCount = 1;
 }
 public GrepConsoleProgram(ArgsList argsList)
 {
     this.argsList = argsList;
 }
Beispiel #4
0
 public Launcher(string[] args, ArgumentParser parser)
 {
     _args    = args;
     _parser  = parser;
     argsList = new ArgsList();
 }