View Source
Interface IDocumentUrlService
Assembly: Umbraco.Core.dll
Syntax
public interface IDocumentUrlService
Methods
View Source
CreateOrUpdateUrlSegmentsAsync(Guid)
Declaration
Task CreateOrUpdateUrlSegmentsAsync(Guid key)
Parameters
Type |
Name |
Description |
Guid |
key |
|
Returns
View Source
CreateOrUpdateUrlSegmentsAsync(IEnumerable<IContent>)
Declaration
Task CreateOrUpdateUrlSegmentsAsync(IEnumerable<IContent> documents)
Parameters
Type |
Name |
Description |
IEnumerable<IContent> |
documents |
|
Returns
View Source
CreateOrUpdateUrlSegmentsWithDescendantsAsync(Guid)
Declaration
Task CreateOrUpdateUrlSegmentsWithDescendantsAsync(Guid key)
Parameters
Type |
Name |
Description |
Guid |
key |
|
Returns
View Source
DeleteUrlsFromCacheAsync(IEnumerable<Guid>)
Declaration
Task DeleteUrlsFromCacheAsync(IEnumerable<Guid> documentKeys)
Parameters
Type |
Name |
Description |
IEnumerable<Guid> |
documentKeys |
|
Returns
View Source
GetDocumentKeyByRoute(String, String, Nullable<Int32>, Boolean)
Declaration
Guid? GetDocumentKeyByRoute(string route, string culture, int? documentStartNodeId, bool isDraft)
Parameters
Type |
Name |
Description |
System.String |
route |
|
System.String |
culture |
|
System.Nullable<System.Int32> |
documentStartNodeId |
|
System.Boolean |
isDraft |
|
Returns
Type |
Description |
System.Nullable<Guid> |
|
View Source
Declaration
string GetLegacyRouteFormat(Guid key, string culture, bool isDraft)
Parameters
Type |
Name |
Description |
Guid |
key |
|
System.String |
culture |
|
System.Boolean |
isDraft |
|
Returns
Type |
Description |
System.String |
|
View Source
GetUrlSegment(Guid, String, Boolean)
Gets the Url from a document key, culture and segment. Preview urls are returned if isPreview is true.
Declaration
string GetUrlSegment(Guid documentKey, string culture, bool isDraft)
Parameters
Type |
Name |
Description |
Guid |
documentKey |
The key of the document.
|
System.String |
culture |
The culture code.
|
System.Boolean |
isDraft |
Whether to get the url of the draft or published document.
|
Returns
Type |
Description |
System.String |
The url of the document.
|
View Source
HasAny()
Declaration
Returns
Type |
Description |
System.Boolean |
|
View Source
InitAsync(Boolean, CancellationToken)
Initializes the service and ensure the content in the database is correct with the current configuration.
Declaration
Task InitAsync(bool forceEmpty, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.Boolean |
forceEmpty |
|
CancellationToken |
cancellationToken |
|
Returns
View Source
ListUrlsAsync(Guid)
Declaration
Task<IEnumerable<UrlInfo>> ListUrlsAsync(Guid contentKey)
Parameters
Type |
Name |
Description |
Guid |
contentKey |
|
Returns
Type |
Description |
Task<IEnumerable<UrlInfo>> |
|
View Source
RebuildAllUrlsAsync()
Declaration
Task RebuildAllUrlsAsync()
Returns