question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Where is HelpOptionAttribute?

See original GitHub issue

I saw some samples that look like this:

[HelpOption]
public string GetUsage()
{
  var help = new HelpText {
    Heading = new HeadingInfo("<<app title>>", "<<app version>>"),
    Copyright = new CopyrightInfo("<<app author>>", 2014),
    AdditionalNewLineAfterOption = true,
    AddDashesToOption = true
  };
  help.AddPreOptionsLine("<<license details here.>>");
  help.AddPreOptionsLine("Usage: app -p Someone");
  help.AddOptions(this);
  return help;
}

However it doesn’t seem like HelpOptionAttribute exists in the latest release (2.1.1-beta). What do I use instead?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
theOrilliancommented, Aug 28, 2018

Is it possible to derive the usage text without being in the middle of a parse operation? All I want is a method Options.GetUsage() that spits out the usage info as it would as if --help was one of the arguments.

3reactions
dev-thinkscommented, May 11, 2018

Hmmm…downgrading to old version. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Class HelpOptionAttribute
Class HelpOptionAttribute. The option used to determine if help text should be displayed. This should only be used once per command line app....
Read more >
C# (CSharp) CommandLine HelpOptionAttribute Examples
HelpOptionAttribute extracted from open source projects. You can rate examples to help us improve the quality of examples.
Read more >
c# - Command Line Parser missing library includes?
It seems DefaultValue and ParserStateAttribute are no longer part of the API. Check out the up-to-date demo project which is part of the ......
Read more >
CommandLineApplication.HelpOption(String) Method
Definition · Parameters · Returns.
Read more >
McMaster.Extensions.CommandLineUtils 2.1.0
Command-line parsing API. A community-maintained fork of Microsoft.Extensions.CommandLineUtils, plus extras. Commonly used...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found