public CommandLineApplication() { Application = new McMaster.Extensions.CommandLineUtils.CommandLineApplication(throwOnUnexpectedArg: false); Application.HelpOption("-? | -h | --help"); _applicationRoot = Application.Option("-s | --source", "Solution or directory for OmniSharp to point at (defaults to current directory).", CommandOptionType.SingleValue); _logLevel = Application.Option("-l | --loglevel", "Level of logging (defaults to 'Information').", CommandOptionType.SingleValue); _verbose = Application.Option("-v | --verbose", "Explicitly set 'Debug' log level.", CommandOptionType.NoValue); _hostPid = Application.Option("-hpid | --hostPID", "Host process ID.", CommandOptionType.SingleValue); _zeroBasedIndices = Application.Option("-z | --zero-based-indices", "Use zero based indices in request/responses (defaults to 'false').", CommandOptionType.NoValue); _plugin = Application.Option("-pl | --plugin", "Plugin name(s).", CommandOptionType.MultipleValue); _debug = Application.Option("-d | --debug", "Wait for debugger to attach", CommandOptionType.NoValue); }
/// <summary> /// Adds the help option with the template <c>-?|-h|--help</c>. /// </summary> /// <param name="app"></param> /// <returns></returns> public static CommandOption HelpOption(this CommandLineApplication app) => app.HelpOption(Strings.DefaultHelpTemplate);