Class UrlProviderExtensions
Inheritance
System.Object
Namespace: Umbraco.Extensions
Assembly: Umbraco.Core.dll
Syntax
public static class UrlProviderExtensions
Methods
View SourceGetContentUrlsAsync(IContent, IPublishedRouter, IUmbracoContext, ILanguageService, ILocalizedTextService, IContentService, IVariationContextAccessor, ILogger<IContent>, UriUtility, IPublishedUrlProvider)
Declaration
public static async Task<IEnumerable<UrlInfo>> GetContentUrlsAsync(this IContent content, IPublishedRouter publishedRouter, IUmbracoContext umbracoContext, ILanguageService languageService, ILocalizedTextService textService, IContentService contentService, IVariationContextAccessor variationContextAccessor, ILogger<IContent> logger, UriUtility uriUtility, IPublishedUrlProvider publishedUrlProvider)
Parameters
Type | Name | Description |
---|---|---|
IContent | content | |
IPublishedRouter | publishedRouter | |
IUmbracoContext | umbracoContext | |
ILanguageService | languageService | |
ILocalizedTextService | textService | |
IContentService | contentService | |
IVariationContextAccessor | variationContextAccessor | |
ILogger<IContent> | logger | |
UriUtility | uriUtility | |
IPublishedUrlProvider | publishedUrlProvider |
Returns
Type | Description |
---|---|
Task<IEnumerable<UrlInfo>> |
GetContentUrlsAsync(IContent, IPublishedRouter, IUmbracoContext, ILanguageService, ILocalizedTextService, IContentService, IVariationContextAccessor, ILogger<IContent>, UriUtility, IPublishedUrlProvider, IPublishedContentCache, IDocumentNavigationQueryService)
Gets the URLs of the content item.
Declaration
public static async Task<IEnumerable<UrlInfo>> GetContentUrlsAsync(this IContent content, IPublishedRouter publishedRouter, IUmbracoContext umbracoContext, ILanguageService languageService, ILocalizedTextService textService, IContentService contentService, IVariationContextAccessor variationContextAccessor, ILogger<IContent> logger, UriUtility uriUtility, IPublishedUrlProvider publishedUrlProvider, IPublishedContentCache contentCache, IDocumentNavigationQueryService navigationQueryService)
Parameters
Type | Name | Description |
---|---|---|
IContent | content | |
IPublishedRouter | publishedRouter | |
IUmbracoContext | umbracoContext | |
ILanguageService | languageService | |
ILocalizedTextService | textService | |
IContentService | contentService | |
IVariationContextAccessor | variationContextAccessor | |
ILogger<IContent> | logger | |
UriUtility | uriUtility | |
IPublishedUrlProvider | publishedUrlProvider | |
IPublishedContentCache | contentCache | |
IDocumentNavigationQueryService | navigationQueryService |
Returns
Type | Description |
---|---|
Task<IEnumerable<UrlInfo>> |
Remarks
Use when displaying URLs. If errors occur when generating the URLs, they will show in the list.
Contains all the URLs that we can figure out (based upon domains, etc).