public static RouteValueDictionary Extend(this RouteValueDictionary self, RouteValueDictionary additional, bool replaceExisting = false) { //additional.ToList().ForEach(x => { @self[x.Key] = HtmlHelpers.AppendValues(@self[x.Key], (replaceExisting ? x.Value : SplitValues(@self[x.Key]) + $" {x.Value}")); }); additional.ToList().ForEach(x => { self[x.Key] = HtmlHelpers.AppendValues(self[x.Key], x.Value); }); return(self); }