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 functions used in overridable methods? #204

Open
slymuffhugger opened this issue Jan 21, 2022 · 5 comments
Open

Private functions used in overridable methods? #204

slymuffhugger opened this issue Jan 21, 2022 · 5 comments
Labels
question Further information is requested

Comments

@slymuffhugger
Copy link

Not sure if this qualifies as a "bug", but when attempting to override GenerateProperties by copy/pasting the existing code and modifying I'm met with the dreaded red squiggles because the original Method uses private properties and methods.. I can copy/paste those too, but if it ever changes I won't get those changes. Would it be better if they were public or internal?
image

@slymuffhugger slymuffhugger added the question Further information is requested label Jan 21, 2022
@tonysneed
Copy link
Contributor

Good questions. The private methods can probably be made protected.

Might make a good PR if you are interested. 😄

@slymuffhugger
Copy link
Author

Haven't really contributed much before but I could give it a go 😃

@tonysneed
Copy link
Contributor

Might make for a good first PR. See the contributing guidelines to how to get started.

@slymuffhugger
Copy link
Author

Would we want all of _options accessible or would it be better just to make a protected property that accesses the one property within _options? And should it return false when _options is null? something like
protected bool GenerateComments => _options?.Value?.GenerateComments ?? false;

@tonysneed
Copy link
Contributor

Not a bad idea to make the options protected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants