diff --git a/src/Microsoft.AspNet.Routing/RouteValueDictionary.cs b/src/Microsoft.AspNet.Routing/RouteValueDictionary.cs
index 13a67420b3..6c9ee06fdf 100644
--- a/src/Microsoft.AspNet.Routing/RouteValueDictionary.cs
+++ b/src/Microsoft.AspNet.Routing/RouteValueDictionary.cs
@@ -2,48 +2,21 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace Microsoft.AspNet.Routing
{
- ///
- /// An type for route values.
- ///
- public class RouteValueDictionary : IDictionary
+ public class RouteValueDictionary : Dictionary
{
- private readonly Dictionary _dictionary;
-
- ///
- /// Creates an empty RouteValueDictionary.
- ///
public RouteValueDictionary()
+ : base(StringComparer.OrdinalIgnoreCase)
{
- _dictionary = new Dictionary(StringComparer.OrdinalIgnoreCase);
}
- ///
- /// Creates a RouteValueDictionary initialized with the provided input values.
- ///
- /// Input values to copy into the dictionary.
- public RouteValueDictionary([NotNull] IDictionary values)
- {
- _dictionary = new Dictionary(values, StringComparer.OrdinalIgnoreCase);
- }
-
- ///
- /// Creates a RouteValueDictionary initialized with the provided input values.
- ///
- /// Input values to copy into the dictionary.
- ///
- /// The input parameter is interpreted as a set of key-value-pairs where the property names
- /// are keys, and property values are the values, and copied into the dictionary. Only public
- /// instance non-index properties are considered.
- ///
public RouteValueDictionary(object obj)
- : this()
+ : base(StringComparer.OrdinalIgnoreCase)
{
if (obj != null)
{
@@ -73,162 +46,9 @@ namespace Microsoft.AspNet.Routing
}
}
- ///
- public object this[[NotNull] string key]
+ public RouteValueDictionary(IDictionary other)
+ : base(other, StringComparer.OrdinalIgnoreCase)
{
- get
- {
- object value;
- _dictionary.TryGetValue(key, out value);
- return value;
- }
-
- set
- {
- _dictionary[key] = value;
- }
- }
-
- ///
- /// Gets the comparer for this dictionary.
- ///
- ///
- /// This will always be a reference to
- ///
- public IEqualityComparer Comparer
- {
- get
- {
- return _dictionary.Comparer;
- }
- }
-
- ///
- public int Count
- {
- get
- {
- return _dictionary.Count;
- }
- }
-
- ///
- bool ICollection>.IsReadOnly
- {
- get
- {
- return ((ICollection>)_dictionary).IsReadOnly;
- }
- }
-
- ///
- public Dictionary.KeyCollection Keys
- {
- get
- {
- return _dictionary.Keys;
- }
- }
-
- ///
- ICollection IDictionary.Keys
- {
- get
- {
- return _dictionary.Keys;
- }
- }
-
- ///
- public Dictionary.ValueCollection Values
- {
- get
- {
- return _dictionary.Values;
- }
- }
-
- ///
- ICollection