コード例 #1
0
        internal void ShowUsage()
        {
            CommandUI.PrintUpperCase(this.Name);
            if (this.UsageFunctor != null)
            {
                Console.WriteLine(this.UsageFunctor());
            }

            Console.WriteLine();
        }
コード例 #2
0
ファイル: Commands.cs プロジェクト: ywangmaxmd/nhin-d
 void ShowUsageCommandNotFound(string commandName)
 {
     Console.WriteLine();
     CommandUI.PrintUpperCase("{0}:  No such command.", commandName);
     CommandUI.PrintSectionBreak();
     //
     // Speculatively print out names of commands with this prefix..
     //
     if (this.PrefixMatchCommandNames(commandName).FirstOrDefault() != null)
     {
         //
         // Speculatively print out names of commands with this prefix..
         //
         CommandUI.PrintHeading("Did you mean?");
         this.ListCommands(new string[] { commandName });
     }
     else
     {
         Console.WriteLine(HelpUsage);
     }
 }
コード例 #3
0
 internal void ShowCommand()
 {
     CommandUI.PrintUpperCase(this.Name);
 }