nodify
nodify copied to clipboard
Allow calling GetLinePoints of a base class
📝 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.
Would making these methods protected work in your case?
It would work as well but I didn't find an easy way to cleanly implement that in this PR.