/// <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;
 }
Ejemplo n.º 3
0
 /// <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);
 }
Ejemplo n.º 4
0
 /// <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);
 }
Ejemplo n.º 5
0
 public ProtocolChoicePromptHandler(
     ILanguageServer languageServer,
     IHostInput hostInput,
     IHostOutput hostOutput,
     ILogger logger)
     : base(hostOutput, logger)
 {
     _languageServer = languageServer;
     this._hostInput = hostInput;
     this.hostOutput = hostOutput;
 }
Ejemplo n.º 6
0
 public ProtocolChoicePromptHandler(
     IMessageSender messageSender,
     IHostInput hostInput,
     IHostOutput hostOutput,
     ILogger logger)
     : base(hostOutput, logger)
 {
     this.hostInput     = hostInput;
     this.hostOutput    = hostOutput;
     this.messageSender = messageSender;
 }
Ejemplo n.º 7
0
 /// <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
 }
Ejemplo n.º 8
0
 /// <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);
 }
Ejemplo n.º 9
0
 /// <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);
 }