Ejemplo n.º 1
0
 public WpfConsoleKeyProcessor(WpfConsole wpfConsole)
     : base(wpfConsole.VsTextView)
 {
     WpfConsole       = wpfConsole;
     WpfTextView      = wpfConsole.WpfTextView;
     CommandExpansion = wpfConsole.Factory.GetCommandExpansion(wpfConsole);
 }
        /// <summary>
        /// Initializes a new instance of the ConsoleReadLine class.
        /// </summary>
        public PSLineEditor(ICommandExpansion commandExpansion)
        {
            tokenColors = new ConsoleColor[]
            {
                defaultColor,            // Unknown
                ConsoleColor.Yellow,     // Command
                ConsoleColor.Green,      // CommandParameter
                ConsoleColor.Cyan,       // CommandArgument
                ConsoleColor.Cyan,       // Number
                ConsoleColor.Cyan,       // String
                ConsoleColor.Green,      // Variable
                defaultColor,            // Member
                defaultColor,            // LoopLabel
                ConsoleColor.DarkYellow, // Attribute
                ConsoleColor.DarkYellow, // Type
                ConsoleColor.DarkCyan,   // Operator
                defaultColor,            // GroupStart
                defaultColor,            // GroupEnd
                ConsoleColor.Magenta,    // Keyword
                ConsoleColor.Red,        // Comment
                ConsoleColor.DarkCyan,   // StatementSeparator
                defaultColor,            // NewLine
                defaultColor,            // LineContinuation
                defaultColor,            // Position
            };

            _commandExpansion = commandExpansion;
        }
 public WpfConsoleKeyProcessor(WpfConsole wpfConsole)
     : base(wpfConsole.VsTextView)
 {
     WpfConsole = wpfConsole;
     WpfTextView = wpfConsole.WpfTextView;
     CommandExpansion = wpfConsole.Factory.GetCommandExpansion(wpfConsole);
 }
 public ConsoleListener(IHost host, ICommandExpansion commandExpansion)
 {
     _host             = host;
     _commandExpansion = commandExpansion;
 }