Exemplo n.º 1
0
 public CommandLoop(ILowLevelConsole console, ICommandFactory commandFactory, ILockingService lockingService, IConsoleHistory consoleHistory):
     this(
     new Configuration()
     .UseConsole(console)
     .UseCommandFactory(commandFactory)
     .UseLockingService(lockingService)
     .UseConsoleHistory(consoleHistory)
     )
 {
 }
        public LowLevelToAbstractConsoleAdapter(ILowLevelConsole console)
        {
            Prompt = "(S) ";
            PromptColor = ConsoleColor.DarkCyan;
            
            _inputs = new Subject<ConsoleKeyInfo>();

            _console = console;
            
            //set the pointer for the current line 
            LineStart = new CursorPosition { CursorLeft = _console.CursorLeft, CursorTop = _console.CursorTop };
            LineEnd = new CursorPosition { CursorLeft = _console.CursorLeft, CursorTop = _console.CursorTop };
            _cursorController = new CursorController(console, LineStart, LineEnd);
        }
Exemplo n.º 3
0
 public Configuration UseConsole(ILowLevelConsole console)
 {
     RaiseExceptionOnNull(console, "console");
     Console = console;
     return this;
 }
Exemplo n.º 4
0
 public CommandLoop(ILowLevelConsole console, ICommandFactory commandFactory, ILockingService lockingService):this(console, commandFactory, lockingService, new FileBasedHistory())
 {
 }
Exemplo n.º 5
0
 public CommandLoop(ILowLevelConsole console, ICommandFactory commandFactory):this(console, commandFactory, new FileBasedLockingService())
 {
 }
Exemplo n.º 6
0
 //Todo: Throw these four constructors away once we finished porting the rest of the code over to the configuration object
 public CommandLoop(ILowLevelConsole console) : this(console, new CommandFactory())
 {
 }
 public CursorController(ILowLevelConsole console, CursorPosition lineStart, CursorPosition lineEnd)
 {
     _console = console;
     _lineStart = lineStart;
     _lineEnd = lineEnd;
 }