Class ContentFinderByUrlNew
Provides an implementation of IContentFinder that handles page nice URLs.
Inheritance
System.Object
Namespace: Umbraco.Cms.Core.Routing
Assembly: Umbraco.Core.dll
Syntax
public class ContentFinderByUrlNew : IContentFinder
Remarks
Handles /foo/bar
where /foo/bar
is the nice URL of a document.
Constructors
View SourceContentFinderByUrlNew(ILogger<ContentFinderByUrlNew>, IUmbracoContextAccessor, IDocumentUrlService, IPublishedContentCache)
Initializes a new instance of the ContentFinderByUrl class.
Declaration
public ContentFinderByUrlNew(ILogger<ContentFinderByUrlNew> logger, IUmbracoContextAccessor umbracoContextAccessor, IDocumentUrlService documentUrlService, IPublishedContentCache publishedContentCache)
Parameters
Type | Name | Description |
---|---|---|
ILogger<ContentFinderByUrlNew> | logger | |
IUmbracoContextAccessor | umbracoContextAccessor | |
IDocumentUrlService | documentUrlService | |
IPublishedContentCache | publishedContentCache |
Properties
View SourceUmbracoContextAccessor
Gets the IUmbracoContextAccessor
Declaration
protected IUmbracoContextAccessor UmbracoContextAccessor { get; }
Property Value
Type | Description |
---|---|
IUmbracoContextAccessor |
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 |
---|---|---|
IPublishedRequestBuilder | docreq | |
System.String | route |
Returns
Type | Description |
---|---|
IPublishedContent | 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 |
---|---|---|
IPublishedRequestBuilder | frequest | The |
Returns
Type | Description |
---|---|
Task<System.Boolean> | A value indicating whether an Umbraco document was found and assigned. |