From 92ad5eb87a16597c2b18cbb6daf56a4491a652c9 Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Tue, 8 Apr 2014 20:22:04 +0700 Subject: [PATCH] Fixes #305, exception thrown when using "visibility" as a custom attribute with MvcSiteMapNodeAttribute. --- .../Collections/Specialized/AttributeDictionary.cs | 2 +- .../Collections/Specialized/RouteValueDictionary.cs | 2 +- .../MvcSiteMapProvider/IMvcSiteMapNodeAttribute.cs | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider/Collections/Specialized/AttributeDictionary.cs b/src/MvcSiteMapProvider/MvcSiteMapProvider/Collections/Specialized/AttributeDictionary.cs index 49ea1d5e..fd06a0ce 100644 --- a/src/MvcSiteMapProvider/MvcSiteMapProvider/Collections/Specialized/AttributeDictionary.cs +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider/Collections/Specialized/AttributeDictionary.cs @@ -151,7 +151,7 @@ public void AddRange(string jsonString) public void AddRange(string jsonString, bool throwIfReservedKey) { var items = this.jsonToDictionaryDeserializer.Deserialize(jsonString); - this.AddRange(items); + this.AddRange(items, throwIfReservedKey); } /// diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider/Collections/Specialized/RouteValueDictionary.cs b/src/MvcSiteMapProvider/MvcSiteMapProvider/Collections/Specialized/RouteValueDictionary.cs index 9e9c136e..d3fa20a2 100644 --- a/src/MvcSiteMapProvider/MvcSiteMapProvider/Collections/Specialized/RouteValueDictionary.cs +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider/Collections/Specialized/RouteValueDictionary.cs @@ -146,7 +146,7 @@ public void AddRange(string jsonString) public void AddRange(string jsonString, bool throwIfReservedKey) { var items = this.jsonToDictionaryDeserializer.Deserialize(jsonString); - this.AddRange(items); + this.AddRange(items, throwIfReservedKey); } /// diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider/IMvcSiteMapNodeAttribute.cs b/src/MvcSiteMapProvider/MvcSiteMapProvider/IMvcSiteMapNodeAttribute.cs index 603edb39..cd39324e 100644 --- a/src/MvcSiteMapProvider/MvcSiteMapProvider/IMvcSiteMapNodeAttribute.cs +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider/IMvcSiteMapNodeAttribute.cs @@ -191,6 +191,9 @@ public interface IMvcSiteMapNodeAttribute /// string Route { get; set; } + // TODO: In version 5, RouteValues should be a separate property so the values can be controlled separately, + // similar to how the DynamicNode values are set. + /// /// Gets or sets the preserved route parameter names (= values that will be used from the current request route). ///