Class ContentFinderByUrl
Provides an implementation of IContent
Inheritance
System.Object
Namespace: Umbraco.Cms.Core.Routing
Assembly: Umbraco.Core.dll
Syntax
public class ContentFinderByUrl : IContentFinder
Remarks
Handles /foo/bar
where /foo/bar
is the nice URL of a document.
Constructors
View SourceContentFinderByUrl(ILogger<ContentFinderByUrl>, IUmbracoContextAccessor)
Initializes a new instance of the Content
Declaration
public ContentFinderByUrl(ILogger<ContentFinderByUrl> logger, IUmbracoContextAccessor umbracoContextAccessor)
Parameters
Type | Name | Description |
---|---|---|
ILogger<Content |
logger | |
IUmbraco |
umbracoContextAccessor |
Properties
View SourceUmbracoContextAccessor
Gets the IUmbraco
Declaration
protected IUmbracoContextAccessor UmbracoContextAccessor { get; }
Property Value
Type | Description |
---|---|
IUmbraco |
Methods
View SourceFindContent(IPublishedRequestBuilder, String)
Tries to find an Umbraco document for a PublishedRequest
and a route.
Declaration
protected IPublishedContent FindContent(IPublishedRequestBuilder docreq, string route)
Parameters
Type | Name | Description |
---|---|---|
IPublished |
docreq | |
System. |
route |
Returns
Type | Description |
---|---|
IPublished |
The document node, or null. |
TryFindContent(IPublishedRequestBuilder)
Tries to find and assign an Umbraco document to a PublishedRequest
.
Declaration
public virtual 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. |