Exemple #1
0
        private void writeArguments()
        {
            var argumentReport = new TwoColumnReport("Arguments");

            Arguments.Each(x => argumentReport.Add(x.PropertyName.ToLower(), x.Description));
            argumentReport.Write();
        }
Exemple #2
0
        private void writeFlags()
        {
            var flagReport = new TwoColumnReport("Flags");

            Flags.Each(x => flagReport.Add(x.ToUsageDescription(), x.Description));
            flagReport.Write();
        }
Exemple #3
0
        private void listAllCommands(HelpInput input)
        {
            var report = new TwoColumnReport("Available commands:");

            input.CommandTypes.OrderBy(CommandFactory.CommandNameFor).Each(type =>
            {
                report.Add(CommandFactory.CommandNameFor(type), CommandFactory.DescriptionFor(type));
            });

            report.Write();
        }
Exemple #4
0
        private void writeMultipleUsages()
        {
            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.Usage);
            });

            usageReport.Write();
        }