Skip to content

Commit

Permalink
Remove ProjectN leftover from LINQ's Grouping (#98894)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephentoub authored Feb 24, 2024
1 parent f32c428 commit 79dd9ba
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
8 changes: 0 additions & 8 deletions src/libraries/System.Linq/src/CompatibilitySuppressions.xml

This file was deleted.

10 changes: 1 addition & 9 deletions src/libraries/System.Linq/src/System/Linq/Grouping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,9 @@ public interface IGrouping<out TKey, out TElement> : IEnumerable<TElement>
TKey Key { get; }
}

// It is (unfortunately) common to databind directly to Grouping.Key.
// Because of this, we have to declare this internal type public so that we
// can mark the Key property for public reflection.
//
// To limit the damage, the toolchain makes this type appear in a hidden assembly.
// (This is also why it is no longer a nested type of Lookup<,>).
[DebuggerDisplay("Key = {Key}")]
[DebuggerTypeProxy(typeof(SystemLinq_GroupingDebugView<,>))]
public class Grouping<TKey, TElement> : IGrouping<TKey, TElement>, IList<TElement>
internal sealed class Grouping<TKey, TElement> : IGrouping<TKey, TElement>, IList<TElement>
{
internal readonly TKey _key;
internal readonly int _hashCode;
Expand Down Expand Up @@ -180,8 +174,6 @@ public IEnumerator<TElement> GetEnumerator()

IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();

// DDB195907: implement IGrouping<>.Key implicitly
// so that WPF binding works on this property.
public TKey Key => _key;

int ICollection<TElement>.Count => _count;
Expand Down

0 comments on commit 79dd9ba

Please sign in to comment.