-
Notifications
You must be signed in to change notification settings - Fork 30
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
How is ArgumentRequiresOtherArgumentsCertification supposed to work? #48
Comments
Hi, I'll take a look, it is possible that the parser doesn't take the
default values into account (which I agree would be expected). Are you
using the latest version? I think I've fixed the bug with the wrong error
message..
…On Aug 9, 2017 7:16 PM, "mhsimkin" ***@***.***> wrote:
I have defined my arguments as:
[DistinctGroupsCertification("s", "h,p")]
[ArgumentRequiresOtherArgumentsCertification("h", "p,c,i,o")]
internal class CommandLineArguments
{
ValueArgument(typeof(string), 's', "serverName", Description = "The friendly name given to the rabbit server connection.")]
public string ServerName { get; set; }
[ValueArgument(typeof(string), 'h', "hostName", Description = "The fully qualified host name of the rabbit server.")]
public string ServerHostName { get; set; }
[ValueArgument(typeof(int), 'p', "port", Description = "The port that should be used to connect to the rabbit server.", DefaultValue = 5672)]
public int Port { get; set; }
[RegexValueArgument('c', "credentials", CredentialsRegEx,
Description =
"The username and password that needs to be used to connect to the rabbit server. This needs to be in the format username|password")]
public string Credentials { get; set; }
[ValueArgument(typeof(string), 'v', "virtualHost", Description = "The virtual host on the rabbit server that contains the scribe exchanges.", DefaultValue = "v.pds.ren.scribe")]
public string ScribeVirtualHost { get; set; }
[ValueArgument(typeof(string), 'i', "input", Description = "The scribe input exchange.", DefaultValue = "e.pds.tools.scribe.input")]
public string ScribeInputExchange { get; set; }
[ValueArgument(typeof(string), 'o', "output", Description = "The scribe output exchange.", DefaultValue = "e.pds.tools.scribe.output")]
public string ScribeOutputExchange { get; set; }
}
When I run the application and pass the following on the command line:
-h dwerecrq01.hq.bn-corp.com -c ***@***.***
I'm getting a CommandLineException thrown that contains this message:
None of these arguments: h can be used together with any of these: p,c,i,o.
I expected that the parse should of passed as I had default values for p,
i, and o.
I'm confused as to why I'm getting a message informing me that I can't use
p,c,i,o with h.
Thanks
-marc
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#48>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/ABX8-m3wbEIk7y6-7ujbTeR286sy0PzLks5sWelngaJpZM4OyYXb>
.
|
I'm using 3.0.13. Thanks -marc |
Should be fixed in 3.0.14, thanks for reporting the issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have defined my arguments as:
When I run the application and pass the following on the command line:
-h dwerecrq01.hq.bn-corp.com -c renscribeui@Lithium3
I'm getting a CommandLineException thrown that contains this message:
None of these arguments: h can be used together with any of these: p,c,i,o.
I expected that the parse should of passed as I had default values for p, i, and o.
I'm confused as to why I'm getting a message informing me that I can't use p,c,i,o with h.
Thanks
-marc
The text was updated successfully, but these errors were encountered: