private void writeArguments() { var argumentReport = new TwoColumnReport("Arguments"); Arguments.Each(x => argumentReport.Add(x.MemberName.ToLower(), x.Description)); argumentReport.Write(); }
private void writeFlags() { var flagReport = new TwoColumnReport("Flags"); Flags.Each(x => flagReport.Add(x.ToUsageDescription(), x.Description)); flagReport.Write(); }
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(); }