44using System . Collections ;
55using System . Diagnostics ;
66using System . Diagnostics . CodeAnalysis ;
7- using System . Linq ;
7+ using Microsoft . AspNetCore . Shared ;
88
99namespace Microsoft . AspNetCore . Http ;
1010
11- [ DebuggerTypeProxy ( typeof ( ItemsDictionaryDebugView ) ) ]
11+ [ DebuggerTypeProxy ( typeof ( DictionaryDebugView < object , object > ) ) ]
1212[ DebuggerDisplay ( "Count = {Items.Count}" ) ]
1313internal sealed class ItemsDictionary : IDictionary < object , object ? >
1414{
@@ -142,7 +142,7 @@ private void EnsureDictionary()
142142
143143 private sealed class EmptyEnumerator : IEnumerator < KeyValuePair < object , object ? > >
144144 {
145- // In own class so only initalized if GetEnumerator is called on an empty ItemsDictionary
145+ // In own class so only initialized if GetEnumerator is called on an empty ItemsDictionary
146146 public static readonly IEnumerator < KeyValuePair < object , object ? > > Instance = new EmptyEnumerator ( ) ;
147147 public KeyValuePair < object , object ? > Current => default ;
148148
@@ -159,16 +159,8 @@ public void Reset()
159159
160160 private static class EmptyDictionary
161161 {
162- // In own class so only initalized if CopyTo is called on an empty ItemsDictionary
162+ // In own class so only initialized if CopyTo is called on an empty ItemsDictionary
163163 public static readonly IDictionary < object , object ? > Dictionary = new Dictionary < object , object ? > ( ) ;
164164 public static ICollection < KeyValuePair < object , object ? > > Collection => Dictionary ;
165165 }
166-
167- private sealed class ItemsDictionaryDebugView ( ItemsDictionary dictionary )
168- {
169- private readonly ItemsDictionary _dictionary = dictionary ;
170-
171- [ DebuggerBrowsable ( DebuggerBrowsableState . RootHidden ) ]
172- public KeyValuePair < object , object ? > [ ] Items => _dictionary . ToArray ( ) ;
173- }
174166}
0 commit comments