/// <summary> /// Creates an instance of the ConsoleInputPromptHandler class. /// </summary> /// <param name="hostOutput"> /// The IHostOutput implementation to use for writing to the /// console. /// </param> /// <param name="logger">An ILogger implementation used for writing log messages.</param> public ConsoleInputPromptHandler( IHostOutput hostOutput, ILogger logger) : base(logger) { this.hostOutput = hostOutput; }
/// <summary> /// Creates an instance of the ConsoleInputPromptHandler class. /// </summary> /// <param name="consoleReadLine"> /// The ConsoleReadLine instance to use for interacting with the terminal. /// </param> /// <param name="hostOutput"> /// The IHostOutput implementation to use for writing to the /// console. /// </param> /// <param name="logger">An ILogger implementation used for writing log messages.</param> public TerminalInputPromptHandler( ConsoleReadLine consoleReadLine, IHostOutput hostOutput, ILogger logger) : base(hostOutput, logger) { this.consoleReadLine = consoleReadLine; }
/// <summary> /// Writes output of a particular type to the user interface /// with a newline ending. /// </summary> /// <param name="hostOutput"> /// The IHostOutput implementation to use for WriteOutput calls. /// </param> /// <param name="outputString"> /// The output string to be written. /// </param> /// <param name="outputType"> /// Specifies the type of output to be written. /// </param> public static void WriteOutput( this IHostOutput hostOutput, string outputString, OutputType outputType) { hostOutput.WriteOutput( outputString, true, OutputType.Normal); }
/// <summary> /// Writes normal output to the user interface. /// </summary> /// <param name="hostOutput"> /// The IHostOutput implementation to use for WriteOutput calls. /// </param> /// <param name="outputString"> /// The output string to be written. /// </param> /// <param name="includeNewLine"> /// If true, a newline should be appended to the output's contents. /// </param> public static void WriteOutput( this IHostOutput hostOutput, string outputString, bool includeNewLine) { hostOutput.WriteOutput( outputString, includeNewLine, OutputType.Normal); }
public ProtocolChoicePromptHandler( ILanguageServer languageServer, IHostInput hostInput, IHostOutput hostOutput, ILogger logger) : base(hostOutput, logger) { _languageServer = languageServer; this._hostInput = hostInput; this.hostOutput = hostOutput; }
public ProtocolChoicePromptHandler( IMessageSender messageSender, IHostInput hostInput, IHostOutput hostOutput, ILogger logger) : base(hostOutput, logger) { this.hostInput = hostInput; this.hostOutput = hostOutput; this.messageSender = messageSender; }
/// <summary> /// Writes output of a particular type to the user interface. /// </summary> /// <param name="hostOutput"> /// The IHostOutput implementation to use for WriteOutput calls. /// </param> /// <param name="outputString"> /// The output string to be written. /// </param> /// <param name="includeNewLine"> /// If true, a newline should be appended to the output's contents. /// </param> /// <param name="outputType"> /// Specifies the type of output to be written. /// </param> public static void WriteOutput( this IHostOutput hostOutput, string outputString, bool includeNewLine, OutputType outputType) { hostOutput.WriteOutput( outputString, includeNewLine, outputType, ConsoleColor.Gray, (ConsoleColor)(-1)); // -1 indicates the console's raw background color }
/// <summary> /// Writes output of a particular type to the user interface. /// </summary> /// <param name="hostOutput"> /// The IHostOutput implementation to use for WriteOutput calls. /// </param> /// <param name="outputString"> /// The output string to be written. /// </param> /// <param name="includeNewLine"> /// If true, a newline should be appended to the output's contents. /// </param> /// <param name="outputType"> /// Specifies the type of output to be written. /// </param> public static void WriteOutput( this IHostOutput hostOutput, string outputString, bool includeNewLine, OutputType outputType) { hostOutput.WriteOutput( outputString, includeNewLine, outputType, ConsoleColor.Gray, ConsoleColor.Black); }
/// <summary> /// Writes normal output with a newline to the user interface. /// </summary> /// <param name="hostOutput"> /// The IHostOutput implementation to use for WriteOutput calls. /// </param> /// <param name="outputString"> /// The output string to be written. /// </param> public static void WriteOutput( this IHostOutput hostOutput, string outputString) { hostOutput.WriteOutput(outputString, true); }