-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parameter attributes aren't working #21
Comments
Please check if you get any compilation warnings. It is possible that the
|
Thanks, that fixed it. I think the documentation needs updating. BTW, I've tried several other command line parser libs the past couple of days and so far this is the best, and requires the least amount of boiler plate code to use. Thanks a lot for creating and maintaining it! Here's what I changed the code to to get default values and auto help text working:
|
Cheers!
|
I'm probably doing something wrong, but it seems like the Parameter attribute doesn't work. I made a test app with a Description property on some parameters, but the help text doesn't show the descriptions, it just shows the parameter Type. Also, I set a default on one of the parameters (int savedSearchId should default to 1), but the value comes in as zero.
This is what I get at the command line:
C:\projects\gbwork\CampaignEngine\src\hydra\bin\Debug>hydra
foo|f: Foo() description...
deletefromsavedsearch|d
/savedsearchid : (Int32)
/savedsearchname : (String)
Here is the code I'm using, it's in a .NET 4.5 Console App, and I added CLAP from nuget:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CLAP;
namespace hydra {
public class hydraConsole {
public static void Main(string[] args) {
Parser.Run(args);
}
}
}
The text was updated successfully, but these errors were encountered: