nodify icon indicating copy to clipboard operation
nodify copied to clipboard

Allow calling GetLinePoints of a base class

Open ToCheckOn opened this issue 5 months ago • 2 comments

📝 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.

ToCheckOn avatar Sep 16 '25 09:09 ToCheckOn

Would making these methods protected work in your case?

miroiu avatar Sep 18 '25 06:09 miroiu

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

ToCheckOn avatar Sep 18 '25 09:09 ToCheckOn