@@ -208,7 +208,6 @@ public RouteValueDictionary(RouteValueDictionary? dictionary)
208208 _arrayStorage = Array . Empty < KeyValuePair < string , object ? > > ( ) ;
209209 }
210210 }
211- #endif
212211
213212 [ MemberNotNull ( nameof ( _arrayStorage ) ) ]
214213 private void Initialize ( IEnumerable < KeyValuePair < string , string ? > > stringValueEnumerable )
@@ -221,21 +220,9 @@ private void Initialize(IEnumerable<KeyValuePair<string, string?>> stringValueEn
221220 }
222221 }
223222
224- [ MemberNotNull ( nameof ( _arrayStorage ) ) ]
225- private void Initialize ( IEnumerable < KeyValuePair < string , object ? > > keyValueEnumerable )
226- {
227- _arrayStorage = Array . Empty < KeyValuePair < string , object ? > > ( ) ;
228-
229- foreach ( var kvp in keyValueEnumerable )
230- {
231- Add ( kvp . Key , kvp . Value ) ;
232- }
233- }
234-
235223 [ MemberNotNull ( nameof ( _arrayStorage ) ) ]
236224 private void Initialize ( RouteValueDictionary dictionary )
237225 {
238- #if ! COMPONENTS
239226 if ( dictionary . _propertyStorage != null )
240227 {
241228 // PropertyStorage is immutable so we can just copy it.
@@ -244,7 +231,6 @@ private void Initialize(RouteValueDictionary dictionary)
244231 _arrayStorage = Array . Empty < KeyValuePair < string , object ? > > ( ) ;
245232 return ;
246233 }
247- #endif
248234
249235 var count = dictionary . _count ;
250236 if ( count > 0 )
@@ -260,6 +246,18 @@ private void Initialize(RouteValueDictionary dictionary)
260246 _arrayStorage = Array . Empty < KeyValuePair < string , object ? > > ( ) ;
261247 }
262248 }
249+ #endif
250+
251+ [ MemberNotNull ( nameof ( _arrayStorage ) ) ]
252+ private void Initialize ( IEnumerable < KeyValuePair < string , object ? > > keyValueEnumerable )
253+ {
254+ _arrayStorage = Array . Empty < KeyValuePair < string , object ? > > ( ) ;
255+
256+ foreach ( var kvp in keyValueEnumerable )
257+ {
258+ Add ( kvp . Key , kvp . Value ) ;
259+ }
260+ }
263261
264262 /// <inheritdoc />
265263 public object ? this [ string key ]
0 commit comments