Conversation
|
Breaking change. And also ad-hoc I'd say. Why would the parent of the last member in the path would be so special? Taking into account the whole path, that would make a lot more sense to me. That would be a breaking change too :) But the whole idea seems kind of subtle and prone to misunderstandings. Not really about the code... |
|
I presume |
|
Where are you seeing "last member in the path"? Both of the following set the parent for every item - unless I'm missing something. node.GetMemberExpressions()
.Select(e => new MapMemberInfo(e.Member, e.Expression.Type)) foreach (var memberName in fullMemberName.Split('.'))
{
var currentType = GetCurrentType(property, type);
property = currentType.GetFieldOrProperty(memberName);
yield return new MapMemberInfo(property, currentType);
}What would be your approach? (requested opinions earlier) |
|
A breaking change would break existing tests - right? Or define breaking change. |
|
You interpret the same parameters in a different way. Clearly some code will break. I guess the problem is that the member list is flattened, as opposed to a structural path. |
|
Seems to me like it's working as before with exception of the "member belongs to a base class" scenario - which is the fix. I don't see The inheritance design is because we collect the member infos before the call to It's ok to come up with a new design once you've had time to think about it - this can stay on hold. We know the underlying problem. |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
| if (ReferenceEquals(null, other)) return false; | ||
| if (ReferenceEquals(this, other)) return true; | ||
|
|
||
| return this._memberInfo.Equals(other); |
There was a problem hiding this comment.
Always false when comparing two MapMemberInfos. My co-workers traced a memory leak back to this line. The projection cache keeps growing in 10.1.1. No longer the case now, so it's fixed in 11.0.

Fix for Issue #3422