Class ContentFinderByRedirectUrl
Provides an implementation of IContent
Inheritance
System.Object
Namespace: Umbraco.Cms.Core.Routing
Assembly: Umbraco.Core.dll
Syntax
public class ContentFinderByRedirectUrl : IContentFinder
Remarks
Assigns a permanent redirect notification to the request.
Constructors
View SourceContentFinderByRedirectUrl(IRedirectUrlService, ILogger<ContentFinderByRedirectUrl>, IPublishedUrlProvider, IUmbracoContextAccessor)
Initializes a new instance of the Content
Declaration
public ContentFinderByRedirectUrl(IRedirectUrlService redirectUrlService, ILogger<ContentFinderByRedirectUrl> logger, IPublishedUrlProvider publishedUrlProvider, IUmbracoContextAccessor umbracoContextAccessor)
Parameters
Type | Name | Description |
---|---|---|
IRedirect |
redirectUrlService | |
ILogger<Content |
logger | |
IPublished |
publishedUrlProvider | |
IUmbraco |
umbracoContextAccessor |
Methods
View SourceTryFindContent(IPublishedRequestBuilder)
Tries to find and assign an Umbraco document to a PublishedRequest
.
Declaration
public async Task<bool> TryFindContent(IPublishedRequestBuilder frequest)
Parameters
Type | Name | Description |
---|---|---|
IPublished |
frequest | The |
Returns
Type | Description |
---|---|
Task<System. |
A value indicating whether an Umbraco document was found and assigned. |
Remarks
Optionally, can also assign the template or anything else on the document request, although that is not required.