Implementing home page management

--HG--
branch : autoroute
This commit is contained in:
Sebastien Ros
2012-01-26 17:57:09 -08:00
parent a8876e6d72
commit b5c7b38e4d
2 changed files with 22 additions and 3 deletions
@@ -1,3 +1,5 @@
using System;
using System.Linq;
using System.Web.Routing;
namespace Orchard.Utility.Extensions {
@@ -17,5 +19,22 @@ namespace Orchard.Utility.Extensions {
return newDictionary;
}
public static bool Compare(this RouteValueDictionary x, RouteValueDictionary y) {
if(x == y) {
return true;
}
if(x == null || y == null) {
return false;
}
if(x.Count != y.Count) {
return false;
}
// keys can be different in case
return x.Keys.All(key => x[key].ToString().Equals(y[key].ToString(), StringComparison.OrdinalIgnoreCase));
}
}
}