Adds AbsolutePathDecoded to IPublishedRequest too

This commit is contained in:
Shannon
2021-01-13 11:15:23 +11:00
parent d1df6c4719
commit 0c012d007c
4 changed files with 12 additions and 2 deletions

View File

@@ -17,6 +17,11 @@ namespace Umbraco.Web.Routing
/// <remarks>The cleaned up Uri has no virtual directory, no trailing slash, no .aspx extension, etc.</remarks>
Uri Uri { get; }
/// <summary>
/// Gets the URI decoded absolute path of the <see cref="Uri"/>
/// </summary>
string AbsolutePathDecoded { get; }
/// <summary>
/// Gets a value indicating the requested content.
/// </summary>

View File

@@ -19,7 +19,7 @@ namespace Umbraco.Web.Routing
Uri Uri { get; }
/// <summary>
/// Gets the decoded absolute path of the <see cref="Uri"/>
/// Gets the URI decoded absolute path of the <see cref="Uri"/>
/// </summary>
string AbsolutePathDecoded { get; }

View File

@@ -13,9 +13,10 @@ namespace Umbraco.Web.Routing
/// <summary>
/// Initializes a new instance of the <see cref="PublishedRequest"/> class.
/// </summary>
public PublishedRequest(Uri uri, IPublishedContent publishedContent, bool isInternalRedirect, ITemplate template, DomainAndUri domain, string culture, string redirectUrl, int? responseStatusCode, IReadOnlyList<string> cacheExtensions, IReadOnlyDictionary<string, string> headers, bool setNoCacheHeader, bool ignorePublishedContentCollisions)
public PublishedRequest(Uri uri, string absPathDecoded, IPublishedContent publishedContent, bool isInternalRedirect, ITemplate template, DomainAndUri domain, string culture, string redirectUrl, int? responseStatusCode, IReadOnlyList<string> cacheExtensions, IReadOnlyDictionary<string, string> headers, bool setNoCacheHeader, bool ignorePublishedContentCollisions)
{
Uri = uri ?? throw new ArgumentNullException(nameof(uri));
AbsolutePathDecoded = absPathDecoded ?? throw new ArgumentNullException(nameof(absPathDecoded));
PublishedContent = publishedContent;
IsInternalRedirect = isInternalRedirect;
Template = template;
@@ -32,6 +33,9 @@ namespace Umbraco.Web.Routing
/// <inheritdoc/>
public Uri Uri { get; }
/// <inheritdoc/>
public string AbsolutePathDecoded { get; }
/// <inheritdoc/>
public bool IgnorePublishedContentCollisions { get; }

View File

@@ -67,6 +67,7 @@ namespace Umbraco.Web.Routing
/// <inheritdoc/>
public IPublishedRequest Build() => new PublishedRequest(
Uri,
AbsolutePathDecoded,
PublishedContent,
IsInternalRedirect,
Template,