private void writeMultipleUsages(string appName) { var usageReport = new TwoColumnReport("Usages") { SecondColumnColor = ConsoleColor.Cyan }; Usages.OrderBy(x => x.Arguments.Count()).ThenBy(x => x.ValidFlags.Count()).Each(u => { usageReport.Add(u.Description, u.ToUsage(appName, _commandName)); }); usageReport.Write(); }
private void listAllCommands(HelpInput input) { if (!input.CommandTypes.Any()) { Console.WriteLine("There are no known commands in this executable!"); return; } var report = new TwoColumnReport("Available commands:"); input.CommandTypes.OrderBy(CommandFactory.CommandNameFor).Each(type => { report.Add(CommandFactory.CommandNameFor(type), CommandFactory.DescriptionFor(type)); }); report.Write(); }