Skip to content
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

Private members in base classes are ignored #287

Closed
Alxandr opened this issue Oct 4, 2019 · 0 comments · Fixed by #288
Closed

Private members in base classes are ignored #287

Alxandr opened this issue Oct 4, 2019 · 0 comments · Fixed by #288
Assignees
Labels
Milestone

Comments

@Alxandr
Copy link
Contributor

Alxandr commented Oct 4, 2019

Describe the bug
If you have nested classes as following:

abstract class BaseCommand {
  [Option("--foo")]
  string Foo { get; }
}

[Command("test")]
class TestCommand : BaseCommand {
}

the --foo option is not configured.
The issue here is that https://github.com/natemcmaster/CommandLineUtils/blob/988c426/src/CommandLineUtils/Internal/ReflectionHelper.cs#L50 does not return private properties of base classes.

Expected behavior
I would expect the the --foo option to be available.

Additional context
Version of McMaster.Extensions.Hosting.CommandLine: 2.4.2

Alxandr added a commit to Alxandr/CommandLineUtils that referenced this issue Oct 4, 2019
Alxandr added a commit to Alxandr/CommandLineUtils that referenced this issue Oct 4, 2019
@natemcmaster natemcmaster added this to the 2.5.0 milestone Oct 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants