-
Notifications
You must be signed in to change notification settings - Fork 654
Showvariable paramter fix #447
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
Conversation
@@ -12,7 +12,7 @@ public class ArgumentParser | |||
{ | |||
static ArgumentParser() | |||
{ | |||
var fields = typeof(VariableProvider).GetFields(BindingFlags.Public | BindingFlags.Static); | |||
var fields = typeof(VersionVariables).GetProperties(); | |||
VersionParts = fields.Select(x => x.Name.ToLower()).ToArray(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should actually be able to just do new VariableProvider().AvailableVariables
now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see an 'AvailableVariables' property contined in VersionVariables. To access that property I need to instantiate a new VersionVariables instance, either directly
new VersionVariables(...).AvailableVariables()
or through
VariableProvider.GetVariablesFor(...).AvailableVariables()
I see I failed the CI build. I'll take a better look at this tonight. |
|
One additional thing which would be good is to make a better error message when the variable doesn't exist. At the moment: I would like
Do you think you could do that as part of this PR? Otherwise this looks good |
@KyleOndy any thoughts on extending this PR to list available variables before I merge? |
Let me clean up what I have and get some tests written. |
@KyleOndy how did you go? |
Working on #403. I am unfamiliar with reflection so I am not sure I am even on the right path here. I will look into writing some tests shortly.