IUrlHelper and support for RouteOptions.LowercaseUrls

changes are made as suggestions.
@rynowak
#518
#Issue:  aspnet/Mvc#7720
This commit is contained in:
kishan.anem 2018-06-01 07:06:17 +05:30 committed by Ryan Nowak
parent cb77c17cf4
commit acea87a617
2 changed files with 6 additions and 3 deletions

View File

@ -10,12 +10,14 @@ namespace Microsoft.AspNetCore.Routing
public class RouteOptions public class RouteOptions
{ {
/// <summary> /// <summary>
/// Gets or sets a value indicating whether all generated URLs are lower-case. it doesn't include the query string. /// Gets or sets a value indicating whether all generated paths URLs are lower-case.
/// Use <see cref="LowercaseQueryStrings" /> to configure the behavior for query strings.
/// </summary> /// </summary>
public bool LowercaseUrls { get; set; } public bool LowercaseUrls { get; set; }
/// <summary> /// <summary>
/// Gets or sets a value indicating whether all generated QUERY STRINGS are lower-case. property will when LowercaseUrls true. /// Gets or sets a value indicating whether a generated query strings are lower-case.
/// This property will be unless <see cref="LowercaseUrls" /> is also <c>true</c>
/// </summary> /// </summary>
public bool LowercaseQueryStrings { get; set; } public bool LowercaseQueryStrings { get; set; }

View File

@ -701,7 +701,8 @@ namespace Microsoft.AspNetCore.Routing
private static Action<RouteOptions> GetRouteOptions( private static Action<RouteOptions> GetRouteOptions(
bool lowerCaseUrls = false, bool lowerCaseUrls = false,
bool appendTrailingSlash = false, bool lowercaseQueryStrings = false) bool appendTrailingSlash = false,
bool lowercaseQueryStrings = false)
{ {
return (options) => return (options) =>
{ {