From: Jarl Gullberg Date: Mon, 26 Jun 2017 19:01:01 +0000 (+0200) Subject: Added help option and moved required argument to the top. X-Git-Tag: v3.0.0~29^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3cb9c5f833907667e2e6414f0618db9f251c3d80;p=platform%2Fcore%2Fcsapi%2Fopentk.git Added help option and moved required argument to the top. --- diff --git a/src/Generator.Rewrite/Options.cs b/src/Generator.Rewrite/Options.cs index 2519e0c..8a122aa 100644 --- a/src/Generator.Rewrite/Options.cs +++ b/src/Generator.Rewrite/Options.cs @@ -1,9 +1,18 @@ using CommandLine; +using CommandLine.Text; namespace OpenTK.Rewrite { public class Options { + [Option('i', "assembly", Required = true, + HelpText = "The path to the target assembly that should be rewritten.")] + public string TargetAssembly { get; set; } + + [Option('k', "signing-key", + HelpText = "The path to the strong name key which should be used to sign or resign the assembly.")] + public string StrongNameKey { get; set; } + [Option('d', "debug", DefaultValue = false, HelpText = "Enable calls to GL.GetError(), wrapped around each native call.")] public bool EnableDebugCalls { get; set; } @@ -12,12 +21,10 @@ namespace OpenTK.Rewrite HelpText = "Force native calls to use DllImport instead of GetProcAddress.")] public bool UseDLLImport { get; set; } - [Option('i', "assembly", Required = true, - HelpText = "The path to the target assembly that should be rewritten.")] - public string TargetAssembly { get; set; } - - [Option('k', "signing-key", - HelpText = "The path to the strong name key which should be used to sign or resign the assembly.")] - public string StrongNameKey { get; set; } + [HelpOption] + public string GetUsage() + { + return HelpText.AutoBuild(this, current => HelpText.DefaultParsingErrorsHandler(this, current)); + } } } \ No newline at end of file