本文整理汇总了C#中CommandLineParser.DefineOptionalQualifier方法的典型用法代码示例。如果您正苦于以下问题:C# CommandLineParser.DefineOptionalQualifier方法的具体用法?C# CommandLineParser.DefineOptionalQualifier怎么用?C# CommandLineParser.DefineOptionalQualifier使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CommandLineParser
的用法示例。
在下文中一共展示了CommandLineParser.DefineOptionalQualifier方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ParseCommandLine
private static void ParseCommandLine(string[] args)
{
CommandLineParser p1 = new CommandLineParser(args);
p1.DefineOptionalQualifier("listRules", ref s_listRules, "Outputs all the rules. If this options is supplied all other options are ignored but you must specify contracts and implDir still '/listRules \"\" /implDirs='.");
if (s_listRules)
return;
CommandLineParser.ParseForConsoleApplication(delegate (CommandLineParser parser)
{
parser.DefineOptionalQualifier("listRules", ref s_listRules, "Outputs all the rules. If this options is supplied all other options are ignored.");
parser.DefineAliases("baseline", "bl");
parser.DefineOptionalQualifier("baseline", ref s_baselineFileName, "Baseline file to skip known diffs.");
parser.DefineOptionalQualifier("remapFile", ref s_remapFile, "File with a list of type and/or namespace remappings to consider apply to names while diffing.");
parser.DefineOptionalQualifier("groupByAssembly", ref s_groupByAssembly, "Group the differences by assembly instead of flattening the namespaces. Defaults to true.");
parser.DefineOptionalQualifier("unifyToLibPath", ref s_unifyToLibPaths, "Unify the assembly references to the loaded assemblies and the assemblies found in the given directories (contractDepends and implDirs). Defaults to true.");
parser.DefineOptionalQualifier("out", ref s_outFile, "Output file path. Default is the console.");
parser.DefineOptionalQualifier("resolveFx", ref s_resolveFx, "If a contract or implementation dependency cannot be found in the given directories, fallback to try to resolve against the framework directory on the machine.");
parser.DefineOptionalQualifier("contractDepends", ref s_contractLibDirs, "Comma delimited list of directories used to resolve the dependencies of the contract assemblies.");
parser.DefineAliases("contractCoreAssembly", "cca");
parser.DefineOptionalQualifier("contractCoreAssembly", ref s_contractCoreAssembly, "Simple name for the core assembly to use.");
parser.DefineAliases("ignoreDesignTimeFacades", "idtf");
parser.DefineOptionalQualifier("ignoreDesignTimeFacades", ref s_ignoreDesignTimeFacades, "Ignore design time facades in the contract set while analyzing.");
parser.DefineOptionalQualifier("warnOnIncorrectVersion", ref s_warnOnIncorrectVersion, "Warn if the contract version number doesn't match the found implementation version number.");
parser.DefineOptionalQualifier("warnOnMissingAssemblies", ref s_warnOnMissingAssemblies, "Warn if the contract assembly cannot be found in the implementation directories. Default is to error and not do anlysis.");
parser.DefineQualifier("implDirs", ref s_implDirs, "Comma delimited list of directories to find the implementation assemblies for each contract assembly.");
parser.DefineOptionalQualifier("mdil", ref s_mdil, "Enforce MDIL servicing rules in addition to IL rules.");
parser.DefineAliases("excludeNonBrowsable", "enb");
parser.DefineOptionalQualifier("excludeNonBrowsable", ref s_excludeNonBrowsable, "When MDIL servicing rules are not being enforced, exclude validation on types that are marked with EditorBrowsable(EditorBrowsableState.Never).");
parser.DefineParameter<string>("contracts", ref s_contractSet, "Comma delimited list of assemblies or directories of assemblies for all the contract assemblies.");
}, args);
}