Esempio n. 1
0
        protected virtual void OnPrintAlternatives(PrintAlternativesEventArgs e)
        {
            var handler = PrintAlternatives;

            if (handler != null)
            {
                handler(this, e);
            }
            else
            {
                Console.WriteLine("Possible completions:");
                foreach (var item in e.Alternatives)
                {
                    Console.WriteLine($"- {item}");
                }
            }
        }
Esempio n. 2
0
        protected virtual void OnPrintAlternatives(PrintAlternativesEventArgs e)
        {
            var handler = PrintAlternatives;

            if (handler != null)
            {
                handler(this, e);
            }
            else
            {
                if (CompletionPrinter != null)
                {
                    CompletionPrinter(e.Alternatives);
                    CompletionPrinter = DefaultCompletionsPrinter;
                }
                else
                {
                    DefaultCompletionsPrinter(e.Alternatives);
                }
            }
        }
Esempio n. 3
0
 protected virtual void OnPrintAlternatives(PrintAlternativesEventArgs e)
 {
     var handler = PrintAlternatives;
     if (handler != null)
     {
         handler(this, e);
     }
     else
     {
         Console.WriteLine("Possible completions:");
         foreach (var item in e.Alternatives)
         {
             Console.WriteLine($"- {item}");
         }
     }
 }
Esempio n. 4
0
 private static void ShellOnPrintAlternatives(object sender, PrintAlternativesEventArgs e)
 {
     ColorConsole.WriteLine("Possible commands: ".Cyan());
     foreach (var alternative in e.Alternatives)
     {
         ColorConsole.WriteLine("- ", alternative.White());
     }
 }