Interface IPublishedRouter
Routes requests.
Namespace: Umbraco.Cms.Core.Routing
Assembly: Umbraco.Core.dll
Syntax
public interface IPublishedRouter
Methods
View SourceCreateRequestAsync(Uri)
Creates a published request.
Declaration
Task<IPublishedRequestBuilder> CreateRequestAsync(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | The current request Uri. |
Returns
Type | Description |
---|---|
Task<IPublishedRequestBuilder> | A published request builder. |
RouteRequestAsync(IPublishedRequestBuilder, RouteRequestOptions)
Sends a IPublishedRequestBuilder through the routing pipeline and builds a result.
Declaration
Task<IPublishedRequest> RouteRequestAsync(IPublishedRequestBuilder request, RouteRequestOptions options)
Parameters
Type | Name | Description |
---|---|---|
IPublishedRequestBuilder | request | The request. |
RouteRequestOptions | options | The options. |
Returns
Type | Description |
---|---|
Task<IPublishedRequest> | The built IPublishedRequest instance. |
UpdateRequestAsync(IPublishedRequest, IPublishedContent)
Updates the request to use the specified IPublishedContent item, or NULL
Declaration
Task<IPublishedRequest> UpdateRequestAsync(IPublishedRequest request, IPublishedContent publishedContent)
Parameters
Type | Name | Description |
---|---|---|
IPublishedRequest | request | The request. |
IPublishedContent | publishedContent |
Returns
Type | Description |
---|---|
Task<IPublishedRequest> |
Remarks
This method is used for 2 cases:
- When the rendering content needs to change due to Public Access rules.
- When there is nothing to render due to circumstances such as no template files. In this case, NULL is used as the parameter.
This method is invoked when the pipeline decides it cannot render the request, for whatever reason, and wants to force it to be re-routed and rendered as if no document were found (404). This occurs if there is no template found and route hijacking was not matched. In that case it's the same as if there was no content which means even if there was content matched we want to run the request through the last chance finders.