Interface IPublishedRouter
Routes requests.
Namespace: Umbraco.Web.Routing
Assembly: Umbraco.Web.dll
Syntax
public interface IPublishedRouter
Methods
View SourceCreateRequest(UmbracoContext, Uri)
Creates a published request.
Declaration
PublishedRequest CreateRequest(UmbracoContext umbracoContext, Uri uri = null)
Parameters
Type | Name | Description |
---|---|---|
UmbracoContext | umbracoContext | The current Umbraco context. |
System.Uri | uri | The (optional) request Uri. |
Returns
Type | Description |
---|---|
PublishedRequest | A published request. |
GetTemplate(String)
Gets a template.
Declaration
ITemplate GetTemplate(string alias)
Parameters
Type | Name | Description |
---|---|---|
System.String | alias | The template alias |
Returns
Type | Description |
---|---|
ITemplate | The template. |
PrepareRequest(PublishedRequest)
Prepares a request for rendering.
Declaration
bool PrepareRequest(PublishedRequest request)
Parameters
Type | Name | Description |
---|---|---|
PublishedRequest | request | The request. |
Returns
Type | Description |
---|---|
System.Boolean | A value indicating whether the request was successfully prepared and can be rendered. |
TryRouteRequest(PublishedRequest)
Tries to route a request.
Declaration
bool TryRouteRequest(PublishedRequest request)
Parameters
Type | Name | Description |
---|---|---|
PublishedRequest | request | The request. |
Returns
Type | Description |
---|---|
System.Boolean | A value indicating whether the request can be routed to a document. |
UpdateRequestToNotFound(PublishedRequest)
Updates the request to "not found".
Declaration
void UpdateRequestToNotFound(PublishedRequest request)
Parameters
Type | Name | Description |
---|---|---|
PublishedRequest | request | The request. |
Remarks
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).