Uh oh!
There was an error while loading. Please reload this page.
Implement Enumerable.*By methods (DistinctBy, ExceptBy, IntersectBy, UnionBy, MinBy, MaxBy) - #50335
Conversation
ghost
commented
Mar 28, 2021
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
ghost
commented
Mar 28, 2021
Tagging subscribers to this area: @eiriktsarpalis Issue DetailsFix #27687. Note that the implementation does not include the following overloads: publicstaticIEnumerable<TSource>ExceptBy<TSource,TKey>(thisIEnumerable<TSource>first,IEnumerable<TSource>second,Func<TSource,TKey>keySelector);publicstaticIEnumerable<TSource>ExceptBy<TSource,TKey>(thisIEnumerable<TSource>first,IEnumerable<TSource>second,Func<TSource,TKey>keySelector,IEqualityComparer<TKey>?comparer);publicstaticIEnumerable<TSource>IntersectBy<TSource,TKey>(thisIEnumerable<TSource>first,IEnumerable<TSource>second,Func<TSource,TKey>keySelector);publicstaticIEnumerable<TSource>IntersectBy<TSource,TKey>(thisIEnumerable<TSource>first,IEnumerable<TSource>second,Func<TSource,TKey>keySelector,IEqualityComparer<TKey>?comparer);I have decided to remove them since they were causing type inference issues and can be expressed trivially in terms of the other
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Stephen Toub <stoub@microsoft.com>
The new linq api introduces MaxBy() and MinBy() dotnet/runtime#50335 which are different from morelinq's impl which I was referencing. To avoid conflicts, rename the my methods. maxima_by() sounds like a more appropriate name.. Also except_by() according to the link is interesting...
Fix#27687.
Note that the implementation does not include the following overloads:
I have decided to remove them since they were causing type inference issues and can be expressed trivially in terms of the other
ExceptByandIntersectByoverloads.