Add internal methods in DataColumn#786
Conversation
189d772 to
479420d
Compare
|
|
||
| private WeakReference<DataTable>? _parent; | ||
|
|
||
| internal DataTable? DataTable => _parent?.TryGetTarget(out DataTable? parent) == true ? parent : null; |
There was a problem hiding this comment.
| internal DataTable? DataTable => _parent?.TryGetTarget(out DataTable? parent) == true ? parent : null; | |
| //// Pass-thru convenience helper to get reference from WeakReference; computed each time, do not store result! | |
| private DataTable? DataTable => _parent?.TryGetTarget(out DataTable? parent) == true ? parent : null; |
Does this need to be internal? I'm a little leery of exposing the reference. I was trying to see where in #781 it was used, but it's been a bit hard to follow.
Should the other properties below be public though to help others understand the current mode of the control for IsAbsolute, IsAuto, and IsStar.
There was a problem hiding this comment.
You’re absolutely right. Since this DataTable property is only used internally within the DataColumn class, it can be made private. I’ll update it accordingly.
As for IsAbsolute, IsAuto, and IsStar, making those properties public would certainly make the current mode of the control easier to understand. However, doing so would also mean adding new public interfaces, which I wanted to avoid.
479420d to
9f56bf8
Compare
Separate PR from #781
Currently there are three
DataColumntypes for the layout logic. I'll add two more types for later improvement.