diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider/Builder/SiteMapBuilderSet.cs b/src/MvcSiteMapProvider/MvcSiteMapProvider/Builder/SiteMapBuilderSet.cs index dd9f7c8d..095edb55 100644 --- a/src/MvcSiteMapProvider/MvcSiteMapProvider/Builder/SiteMapBuilderSet.cs +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider/Builder/SiteMapBuilderSet.cs @@ -104,7 +104,7 @@ public virtual bool UseTitleIfDescriptionNotProvided public virtual bool AppliesTo(string builderSetName) { - return this.instanceName.Equals(builderSetName, StringComparison.InvariantCulture); + return this.instanceName.Equals(builderSetName, StringComparison.Ordinal); } #endregion diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider/Collections/Specialized/RouteValueDictionary.cs b/src/MvcSiteMapProvider/MvcSiteMapProvider/Collections/Specialized/RouteValueDictionary.cs index 244f3135..e9aae2bd 100644 --- a/src/MvcSiteMapProvider/MvcSiteMapProvider/Collections/Specialized/RouteValueDictionary.cs +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider/Collections/Specialized/RouteValueDictionary.cs @@ -305,7 +305,7 @@ protected virtual bool MatchesRouteValue(string key, object value) protected virtual bool MatchesValue(string key, object value) { - return this[key].ToString().Equals(value.ToString(), StringComparison.InvariantCultureIgnoreCase); + return this[key].ToString().Equals(value.ToString(), StringComparison.OrdinalIgnoreCase); } protected virtual bool IsEmptyValue(object value) diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider/CompositeSiteMapNodeVisibilityProvider.cs b/src/MvcSiteMapProvider/MvcSiteMapProvider/CompositeSiteMapNodeVisibilityProvider.cs index c70eaf38..e183e651 100644 --- a/src/MvcSiteMapProvider/MvcSiteMapProvider/CompositeSiteMapNodeVisibilityProvider.cs +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider/CompositeSiteMapNodeVisibilityProvider.cs @@ -42,7 +42,7 @@ public bool IsVisible(ISiteMapNode node, IDictionary sourceMetad public bool AppliesTo(string providerName) { - return this.instanceName.Equals(providerName, StringComparison.InvariantCulture); + return this.instanceName.Equals(providerName, StringComparison.Ordinal); } #endregion diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider/SiteMap.cs b/src/MvcSiteMapProvider/MvcSiteMapProvider/SiteMap.cs index e1d78761..fbac7fd5 100644 --- a/src/MvcSiteMapProvider/MvcSiteMapProvider/SiteMap.cs +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider/SiteMap.cs @@ -899,7 +899,7 @@ protected virtual void ThrowIfHttpMethodInvalid(ISiteMapNode node) if (string.IsNullOrEmpty(node.HttpMethod) || (!EnumHelper.TryParse(node.HttpMethod, true, out verbs) && !node.HttpMethod.Equals("*") && - !node.HttpMethod.Equals("Request", StringComparison.InvariantCultureIgnoreCase))) + !node.HttpMethod.Equals("Request", StringComparison.OrdinalIgnoreCase))) { var allowedVerbs = string.Join(Environment.NewLine, Enum.GetNames(typeof(HttpVerbs))) + Environment.NewLine + "Request" + Environment.NewLine + "*"; throw new MvcSiteMapException(string.Format(Resources.Messages.SiteMapNodeHttpMethodInvalid, node.Key, node.Title, node.HttpMethod, allowedVerbs)); diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider/Web/Mvc/SiteMapHttpRequest.cs b/src/MvcSiteMapProvider/MvcSiteMapProvider/Web/Mvc/SiteMapHttpRequest.cs index ccfde816..fb00ec93 100644 --- a/src/MvcSiteMapProvider/MvcSiteMapProvider/Web/Mvc/SiteMapHttpRequest.cs +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider/Web/Mvc/SiteMapHttpRequest.cs @@ -65,7 +65,7 @@ public override string HttpMethod { bool useRequest = this.node == null || string.Equals(this.node.HttpMethod, "*") || - string.Equals(this.node.HttpMethod, "request", StringComparison.InvariantCultureIgnoreCase); + string.Equals(this.node.HttpMethod, "request", StringComparison.OrdinalIgnoreCase); if (!useRequest) { return string.IsNullOrEmpty(this.node.HttpMethod) diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider/Web/UrlPath.cs b/src/MvcSiteMapProvider/MvcSiteMapProvider/Web/UrlPath.cs index 59991d4f..8c79f694 100644 --- a/src/MvcSiteMapProvider/MvcSiteMapProvider/Web/UrlPath.cs +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider/Web/UrlPath.cs @@ -389,7 +389,7 @@ public bool IsExternalUrl(string url, HttpContextBase httpContext) { var publicFacingUrl = this.GetPublicFacingUrl(httpContext); var isDifferentHost = !uri.Host.ToLowerInvariant().Equals(publicFacingUrl.Host.ToLowerInvariant()); - var isDifferentVirtualApplication = !uri.AbsolutePath.StartsWith(httpContext.Request.ApplicationPath, StringComparison.InvariantCultureIgnoreCase); + var isDifferentVirtualApplication = !uri.AbsolutePath.StartsWith(httpContext.Request.ApplicationPath, StringComparison.OrdinalIgnoreCase); return (isDifferentHost || isDifferentVirtualApplication); }