Ejemplo n.º 1
0
        private static ConsoleReader CreateReader(IEnumerable <ConsoleKeyInfo> keyStream = null, ConsoleCompletionHandler completionHandler = null)
        {
            var consoleOutput = new SimulatedConsoleOutput();
            var consoleInput  = new SimulatedConsoleInput(keyStream ?? Enumerable.Empty <ConsoleKeyInfo>());
            var input         = Substitute.For <IConsoleLineInput>();

            return(new ConsoleReader(input, consoleInput, consoleOutput, null));
        }
Ejemplo n.º 2
0
        private static ConsoleReader CreateReader(IEnumerable <ConsoleKeyInfo> keyStream, ConsoleCompletionHandler completionHandler = null)
        {
            var consoleOutput = new SimulatedConsoleOutput();
            var consoleInput  = new SimulatedConsoleInput(keyStream);
            var input         = new ConsoleLineInput(consoleOutput, new ConsoleInputBuffer(), new ConsoleHistory(), completionHandler);

            return(new ConsoleReader(input, consoleInput, consoleOutput, null));
        }
        private static ConsoleReader CreateReader(IEnumerable <ConsoleKeyInfo> keyStream, ITokenCompleter tokenCompleter = null)
        {
            var consoleOutput = new SimulatedConsoleOutput();
            var consoleInput  = new SimulatedConsoleInput(keyStream);
            var input         = new ConsoleLineInput(consoleOutput, new ConsoleInputBuffer(), new ConsoleHistory())
            {
                TokenCompleter = tokenCompleter
            };

            return(new ConsoleReader(input, consoleInput, consoleOutput, null));
        }
Ejemplo n.º 4
0
 private static ConsoleReader CreateReader(IEnumerable<ConsoleKeyInfo> keyStream, ConsoleCompletionHandler completionHandler = null)
 {
     var consoleOutput = new SimulatedConsoleOutput();
     var consoleInput = new SimulatedConsoleInput(keyStream);
     var input = new ConsoleLineInput(consoleOutput, new ConsoleInputBuffer(), new ConsoleHistory(), completionHandler);
     return new ConsoleReader(input, consoleInput, consoleOutput, null);
 }