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


C# ConsoleOptions.WriteOptionDescriptions方法代码示例

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


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

示例1: WriteHelpText

 private static void WriteHelpText(ConsoleOptions options)
 {
     Console.WriteLine();
     ColorConsole.WriteLine(ColorStyle.Header, "NUNIT-CONSOLE [inputfiles] [options]");
     Console.WriteLine();
     ColorConsole.WriteLine(ColorStyle.Default, "Runs a set of NUnit tests from the console.");
     Console.WriteLine();
     ColorConsole.WriteLine(ColorStyle.SectionHeader, "InputFiles:");
     ColorConsole.WriteLine(ColorStyle.Default, "      One or more assemblies or test projects of a recognized type.");
     Console.WriteLine();
     ColorConsole.WriteLine(ColorStyle.SectionHeader, "Options:");
     using (new ColorConsole(ColorStyle.Default))
     {
         options.WriteOptionDescriptions(Console.Out);
     }
     Console.WriteLine();
     ColorConsole.WriteLine(ColorStyle.SectionHeader, "Description:");
     using (new ColorConsole(ColorStyle.Default))
     {
         Console.WriteLine("      By default, this command runs the tests contained in the");
         Console.WriteLine("      assemblies and projects specified. If the --explore option");
         Console.WriteLine("      is used, no tests are executed but a description of the tests");
         Console.WriteLine("      is saved in the specified or default format.");
         Console.WriteLine();
         Console.WriteLine("      Several options that specify processing of XML output take");
         Console.WriteLine("      an output specification as a value. A SPEC may take one of");
         Console.WriteLine("      the following forms:");
         Console.WriteLine("          --OPTION:filename");
         Console.WriteLine("          --OPTION:filename;format=formatname");
         Console.WriteLine("          --OPTION:filename;transform=xsltfile");
         Console.WriteLine();
         Console.WriteLine("      The --result option may use any of the following formats:");
         Console.WriteLine("          nunit3 - the native XML format for NUnit 3.0");
         Console.WriteLine("          nunit2 - legacy XML format used by earlier releases of NUnit");
         Console.WriteLine();
         Console.WriteLine("      The --explore option may use any of the following formats:");
         Console.WriteLine("          nunit3 - the native XML format for NUnit 3.0");
         Console.WriteLine("          cases  - a text file listing the full names of all test cases.");
         Console.WriteLine("      If --explore is used without any specification following, a list of");
         Console.WriteLine("      test cases is output to the console.");
         Console.WriteLine();
         Console.WriteLine("      If none of the options {--result, --explore, --noxml} is used,");
         Console.WriteLine("      NUnit saves the results to TestResult.xml in nunit3 format");
         Console.WriteLine();
         Console.WriteLine("      Any transforms provided must handle input in the native nunit3 format.");
         Console.WriteLine();
         //Console.WriteLine("Options that take values may use an equal sign, a colon");
         //Console.WriteLine("or a space to separate the option from its value.");
         //Console.WriteLine();
     }
 }
开发者ID:balaghanta,项目名称:nunit-framework,代码行数:51,代码来源:Program.cs


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