-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LambdaContainer misbehaviour when the source contains duplicate items #9
Comments
By the way: how much do you personally value the correct ordering in OLinq? :) |
Hiya. Yes, I know about this merging thing. I couldn't figure out a good way to deal with it. Any fix would be great. Think it works fine on reference types, but not on value types, since their equality is different. The problem is I need to be able to actually find the key for the item in the original dictionary. And that item in the original might in fact be a value type, in which case I have no real way to distinguish it. I don't care about ordering unless OrderBy is specified. |
I actually think one of the best ideas I had was to implement ValueType's differently than reference types. |
It might be worth creating a Wrapper - you can't guarantee that a On 15 September 2014 01:21, Jerome Haltom [email protected] wrote:
|
@mcintyre321: Unsure if it's a real issue... In my experience, the whole WPF data binding infrastructure is so reliant on GetHashCode behaving predictably, that it seems worthless to bother. Are you aware of any examples, where it's useful to override GetHashCode in some non-coventional way? |
A fair point - but the Wrapper might let you use the same code for value On 15 September 2014 11:48, vinesworth [email protected] wrote:
|
A LambdaContainer is effectively a
Dictionary
, keyed by the source elements:When the source contains duplicate elements, they get merged into a single LambdaOperation, which has some undesireable consequences:
At the first glance it looks like simple reference counting would suffice, but I've discovered this issue while trying to make GroupBy notifications respect the ordering. That alone, in turn, requires knowing all of the source item indices, therefore a MultiMap-like solution would fit better.
If my vision of the situation is correct, I'll try fixing it as well :)
The text was updated successfully, but these errors were encountered: