Skip to content

Commit 79dd9ba

Browse files
authored
Remove ProjectN leftover from LINQ's Grouping (#98894)
1 parent f32c428 commit 79dd9ba

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

src/libraries/System.Linq/src/CompatibilitySuppressions.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/libraries/System.Linq/src/System/Linq/Grouping.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,9 @@ public interface IGrouping<out TKey, out TElement> : IEnumerable<TElement>
127127
TKey Key { get; }
128128
}
129129

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

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

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

187179
int ICollection<TElement>.Count => _count;

0 commit comments

Comments
 (0)