I need a version of the mvc RouteValueDictionary that I can chain Add calls to, ie:
new RouteValueDictionaryExtended()
.AddValue("controller", "Home")
.AddValue("action", "Index")
.AddValue("id", 3)
Is there a more description name I can use for this instead of just "Extended"?
public class RouteValueDictionaryExtended : System.Web.Routing.RouteValueDictionary
{
public RouteValueDictionaryExtended() : base() { }
public RouteValueDictionaryExtended(object values) : base(values) { }
public RouteValueDictionaryExtended(System.Collections.Generic.IDictionary<string,object> dict) : base(dict) { }
public RouteValueDictionaryExtended AddValue(string key, object obj)
{
var newDict = new RouteValueDictionaryExtended(this);
newDict.Add(key, obj);
return newDict;
}
}