当前位置: 首页>>代码示例>>C#>>正文


C# HelpText.AddPostOptionsLine方法代码示例

本文整理汇总了C#中CommandLine.Text.HelpText.AddPostOptionsLine方法的典型用法代码示例。如果您正苦于以下问题:C# HelpText.AddPostOptionsLine方法的具体用法?C# HelpText.AddPostOptionsLine怎么用?C# HelpText.AddPostOptionsLine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CommandLine.Text.HelpText的用法示例。


在下文中一共展示了HelpText.AddPostOptionsLine方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetUsage

        public string GetUsage()
        {
            string processname = Process.GetCurrentProcess().ProcessName;

            var help = new HelpText
            {
                AdditionalNewLineAfterOption = false,
                AddDashesToOption = true,
                Copyright = new CopyrightInfo("Geoffrey Huntley <[email protected]>", DateTime.Now.Year),
                MaximumDisplayWidth = 160,
            };

            help.AddPreOptionsLine(Environment.NewLine);
            help.AddPreOptionsLine(
                String.Format(
                    "Usage: {0} --destination C:\\backups\\ --sleep 600 --instance https://yourinstance.atlassian.net --username admin --password password",
                    processname));

            help.AddOptions(this);

            if (LastParserState.Errors.Count <= 0) return help;

            string errors = help.RenderParsingErrorsText(this, 2); // indent with two spaces
            if (!string.IsNullOrEmpty(errors))
            {
                help.AddPostOptionsLine(Environment.NewLine);
                help.AddPostOptionsLine("ERROR(s):");help.AddPostOptionsLine(Environment.NewLine);
                help.AddPostOptionsLine(errors);
            }

            return help;
        }
开发者ID:stevegore,项目名称:atlassian-cloud-backup,代码行数:32,代码来源:CommandLineOptions.cs

示例2: GetUsage

 public string GetUsage()
 {
     var help = new HelpText()
     {
         AddDashesToOption = true
     };
     help.AddPreOptionsLine("For details regarding Roku development, visit http://sdkdocs.roku.com/display/sdkdoc/Developer+Guide");
     help.AddPreOptionsLine("");
     help.AddPreOptionsLine("Usage:");
     help.AddPostOptionsLine("Example:   rokuloader -h 192.168.1.10 -p password -z c:\\rokudev\\package.zip");
     help.AddPostOptionsLine("");
     help.AddOptions(this);
     return help;
 }
开发者ID:patrick0xf,项目名称:RokuLoader,代码行数:14,代码来源:Options.cs

示例3: GetUsage

        public string GetUsage()
        {
            var help = new HelpText {
                Heading = new HeadingInfo("PIXIE", typeof(Program).Assembly.GetName().Version.ToString()),
                Copyright = new CopyrightInfo("PNNL", 2015),
                AdditionalNewLineAfterOption = true,
                AddDashesToOption = true
            };

            help.AddPostOptionsLine("  Example: PIXIE [YourData.UIMF]");
            help.AddPostOptionsLine("  Example: PIXIE [YourData1.UIMF] [YourData2.UIMF] [YourData3.UIMF]...");
            help.AddPostOptionsLine(string.Empty);
            help.AddOptions(this);
            return help;
        }
开发者ID:PNNL-Comp-Mass-Spec,项目名称:PIXIE,代码行数:15,代码来源:IndexerOptions.cs

示例4: GetUsage

        public string GetUsage()
        {
            var help = new HelpText
                           {
                                Heading = "Pluggable Workers Runner",
                                Copyright = new CopyrightInfo("Lazy Developers Group, LLC", 2012),
                                AddDashesToOption = true
                           };

            help.AddPreOptionsLine("This application supports the following command line arguments.");
            help.AddPostOptionsLine("Short parameters must be prefixed with a single dash, long names by two dashes.");
            help.AddPostOptionsLine("Parameters values of more than one word must be enclosed in quotes.");
            help.AddPostOptionsLine("\n\n");
            help.AddOptions(this);

            return help;
        }
开发者ID:nathanhoneycutt,项目名称:PluggableWorkers,代码行数:17,代码来源:CommandLineOptions.cs

示例5: GetUsage

 public string GetUsage()
 {
     var help = new HelpText("Windows S3 Uploader");
       help.Copyright = new CopyrightInfo("Palomino Labs, Inc.", 2012);
       help.AddPreOptionsLine("Command options:");
       help.AddOptions(this);
       help.AddPostOptionsLine("Omit accessKey and secretKey to get credentials from IAM");
       return help;
 }
开发者ID:palominolabs,项目名称:windows_s3_uploader,代码行数:9,代码来源:Program.cs

示例6: GetUsage

 public string GetUsage()
 {
     var help = new HelpText
     {
         Heading = new HeadingInfo("WamsTop", "0.1"),
         Copyright = new CopyrightInfo("Tobias Weisserth", 2013),
         AdditionalNewLineAfterOption = true,
         AddDashesToOption = true
     };
     help.AddPreOptionsLine("Apache License, Version 2.0");
     help.AddPreOptionsLine("");
     help.AddPreOptionsLine("Usage: WamsTop.exe -e|-entity [Assets|Jobs|Processors] [-v] [-d]");
     help.AddOptions(this);
     help.AddPostOptionsLine("");
     help.AddPostOptionsLine("Under development, please check https://github.com/polarapfel/WamsTop for latest release!");
     help.AddPostOptionsLine("");
     return help;
 }
开发者ID:polarapfel,项目名称:WamsTop,代码行数:18,代码来源:Program.cs

示例7: GetUsage

 public string GetUsage()
 {
     var help = new HelpText {
         AddDashesToOption = true,
         Heading = "Usage: AccuracyExperiment [OPTIONS]",
     };
     help.AddPostOptionsLine("詳しくは ReadMe.md を参照.\n");
     help.AddOptions(this);
     return help;
 }
开发者ID:nojima,项目名称:GMF,代码行数:10,代码来源:Program.cs

示例8: GetUsage

        public String GetUsage()
        {
            var help = new HelpText(new HeadingInfo("MsBuilderific", "1.0.1").ToString()){
                MaximumDisplayWidth = Console.WindowWidth, 
                Copyright = new CopyrightInfo("Vooban Inc.", 2011)
            };

            help.AddPreOptionsLine("Usage : MsBuilderific.Console -r C:\\Sources -e C:\\Sources\\test.csproj;C:\\Sources\\Obsolete;");
            help.AddPreOptionsLine("");
            help.AddOptions(this);
            help.AddPostOptionsLine("\r\n"); 

            return help;
        }        
开发者ID:Vooban,项目名称:vooban.msbuilderific,代码行数:14,代码来源:MsBuilderificCoreOptions.cs

示例9: GetUsage

        public String GetUsage()
        {
            var help = new HelpText(new HeadingInfo("MsBuild Visitor", null).ToString())
            {
                MaximumDisplayWidth = Console.WindowWidth,
                Copyright = new CopyrightInfo("Vooban Inc.", 2011)
            };

            help.AddPreOptionsLine("");
            help.AddOptions(this);
            help.AddPostOptionsLine("\r\n"); 

            return help;
        }
开发者ID:Vooban,项目名称:vooban.msbuilderific,代码行数:14,代码来源:MsBuildProjectVisitorOptions.cs

示例10: GetUsage

        public string GetUsage()
        {
            Assembly assembly = Assembly.GetEntryAssembly();
            AssemblyName assemblyName = assembly.GetName();
            HelpText help = new HelpText
            {
                Heading = new HeadingInfo(assemblyName.Name, assemblyName.Version.ToString()),
                Copyright = new CopyrightInfo("CHECK24", 2013),
                AdditionalNewLineAfterOption = false,
                AddDashesToOption = true
            };

            help.AddPreOptionsLine(string.Format("Usage: {0} (-o|--option) value?", Path.GetFileName(assembly.Location)));
            help.AddOptions(this);
            help.AddPostOptionsLine(Environment.NewLine);

            return help;
        }
开发者ID:CHECK24,项目名称:c24.TeamSharper,代码行数:18,代码来源:CommandLineOptions.cs

示例11: GetUsage

        public string GetUsage()
        {
            var help = new HelpText {
                Heading = "arcomp is a simple command-line utility used to compare archives or show their content.",
                AdditionalNewLineAfterOption = true,
                AddDashesToOption = true
            };

            HandleParsingErrorsInHelp(help);
            help.AddPreOptionsLine("Password-protected archives are not supported.");
            help.AddPostOptionsLine(Environment.NewLine + "Usage examples");
            help.AddPostOptionsLine(string.Empty);
            help.AddPostOptionsLine("Shows properties and entries of one or more archives:");
            help.AddPostOptionsLine("arcomp -s \"archive 1.zip\" \"..\\another archive 2.rar\" \"C:\\some folder\\other archive 3.7z\"");
            help.AddPostOptionsLine(string.Empty);
            help.AddPostOptionsLine("Compares two archives and shows their difference in properties and entries:");
            help.AddPostOptionsLine("arcomp -c \"archive 1.zip\" \"..\\another archive 2.rar\"");
            help.AddOptions(this);

            return help;
        }
开发者ID:EnoughTea,项目名称:arcomp,代码行数:21,代码来源:CommandLineOptions.cs

示例12: GetUsage

        public string GetUsage()
        {
            var assemblyName = Assembly.GetExecutingAssembly().GetName();
            var help = new HelpText
            {
                Heading = new HeadingInfo("Test Data Generator", assemblyName.Version.ToString()),
                Copyright = new CopyrightInfo("Gary Kenneally (@SecretDeveloper)", 2014),
                AdditionalNewLineAfterOption = false,
                AddDashesToOption = true
            };
            help.AddPreOptionsLine("This is free software. You may redistribute copies of it under the terms of the MIT License.");
            help.AddPreOptionsLine(" <http://www.opensource.org/licenses/mit-license.php>");

            help.AddPostOptionsLine("Examples:");
            help.AddPostOptionsLine("\t tdg -t '<<LL>>'");
            help.AddPostOptionsLine("\t tdg -t '<<LL>>' -c 10");
            help.AddPostOptionsLine("\t tdg -t '<<LL>>' -o 'c:\\test.txt' -c 10");
            help.AddPostOptionsLine("\t tdg -i 'c:\\input.txt' -o 'c:\\test.txt' -c 10");
            help.AddPostOptionsLine("Either a Template (-t), Pattern (-p) or input File (-i) value must be provided as input.");
            
            help.AddOptions(this);
            return help;
        }
开发者ID:drupaltr,项目名称:TestDataGenerator,代码行数:23,代码来源:CommandLineArgs.cs

示例13: GetUsage

        public string GetUsage()
        {
            var help = new HelpText
            {
                Heading = new HeadingInfo(ThisAssembly.Product, "v" + ThisAssembly.InformationalVersion),
                Copyright = new CopyrightInfo(ThisAssembly.Author, ThisAssembly.Year),
                AdditionalNewLineAfterOption = false,
                AddDashesToOption = true
            };

            help.AddPreOptionsLine("\nBased on Robs Heightmap Parser Code");
            help.AddPreOptionsLine("");
            help.AddPreOptionsLine("Usage: HeightMapGenerator [PRJ-FILE] [OPTION]...");
            help.AddPreOptionsLine("       HeightMapGenerator [PRJ-FILE] [HEIGHTMAP-IMAGE] [OPTION]...");

            help.AddPostOptionsLine("Per default both heightmaps are overwritten with the image, use -1 or -2 to change this.");
            //help.AddPostOptionsLine("Use a 16-Bit TIFF for best results.);
            help.AddPostOptionsLine("");
            help.AddPostOptionsLine("Example: HeightMapGenerator B1_01.PRJ heightmap.png");
            help.AddPostOptionsLine("Overwrites both heightmaps of B1_01.PRJ with the one in heightmap.png");
            help.AddPostOptionsLine("");
            help.AddPostOptionsLine("Enjoy!");

            help.AddOptions(this);

            return help;
        }
开发者ID:Ghabry,项目名称:Dark-Omen-Heightmap-Generator,代码行数:27,代码来源:Options.cs

示例14: GetUsage

        public string GetUsage()
        {
            var help = new HelpText("\nSTAHC Utility");
            help.AddPreOptionsLine("This utility takes a collection of files and settings, uploads them to the");
            help.AddPreOptionsLine("Windows Azure platform and then deploys them. Also provided are methods for ");
            help.AddPreOptionsLine("terminating the operation and cleaning up after one is done. ");
            help.AddOptions(this);
            help.AddPostOptionsLine("\n");

            return help;
        }
开发者ID:argodev,项目名称:stahc,代码行数:11,代码来源:CommandLineOptions.cs

示例15: GetUsage

        public string GetUsage()
        {
            var help = new HelpText
            {
                Heading = new HeadingInfo("#b#Versionr## #q#- the less hateful version control system.##"),
                AddDashesToOption = false,
            };
            help.FormatOptionHelpText += Help_FormatOptionHelpText;

            // ...
            if (LastParserState != null && LastParserState.Errors.Any())
            {
                var errors = help.RenderParsingErrorsText(this, 2); // indent with two spaces

                if (!string.IsNullOrEmpty(errors))
                {
                    help.AddPreOptionsLine(string.Concat(Environment.NewLine, "Invalid command:"));
                    help.AddPreOptionsLine(errors);
                }
            }
            help.AddPreOptionsLine("Usage: #b#versionr## COMMAND #q#[options]## <arguments>\n\n#b#Commands:");
            help.AddOptions(this);
            help.AddPostOptionsLine("##For additional help, use: #b#versionr## COMMAND #b#--help##.");
            help.AddPostOptionsLine("To display version information, use the `#b#--version##` option.\n");
            return help;
        }
开发者ID:eatplayhate,项目名称:versionr,代码行数:26,代码来源:Program.cs


注:本文中的CommandLine.Text.HelpText.AddPostOptionsLine方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。