Skip to content

Allow calling GetLinePoints of a base class - #241

Open
ToCheckOn wants to merge 2 commits into
miroiu:masterfrom
ToCheckOn:master
Open

ToCheckOn wants to merge 2 commits into
miroiu:masterfrom
ToCheckOn:master

Conversation

@ToCheckOn

Copy link
Copy Markdown

📝 Description of the Change

I've been using nodify and had an issue where I wanted to use the result of GetLinePoints of StepConnection, but since it was private I had to either copy paste the code or use reflection.

This works for both base and derived implementing same and different amounts of points.

example:

BaseClass : ILinePoints<Point2>
DerivedClass : ILinePoints<Point2>

((ILinePoints<Point2>)(BaseClass)derivedClass).GetLinePoints(source, target)

🐛 Possible Drawbacks

Not to my knowledge except the code being a tiny bit less readable.

@miroiu

miroiu commented Sep 18, 2025

Copy link
Copy Markdown
Owner

Would making these methods protected work in your case?

@ToCheckOn

ToCheckOn commented Sep 18, 2025 •

Copy link
Copy Markdown
Author

It would work as well but I didn't find an easy way to cleanly implement that in this PR.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants