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)
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)
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>> |
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).
GetContentUrlsAsync(IContent, IPublishedRouter, IUmbracoContext, ILocalizationService, ILocalizedTextService, IContentService, IVariationContextAccessor, ILogger<IContent>, UriUtility, IPublishedUrlProvider)
Declaration
public static async Task<IEnumerable<UrlInfo>> GetContentUrlsAsync(this IContent content, IPublishedRouter publishedRouter, IUmbracoContext umbracoContext, ILocalizationService localizationService, ILocalizedTextService textService, IContentService contentService, IVariationContextAccessor variationContextAccessor, ILogger<IContent> logger, UriUtility uriUtility, IPublishedUrlProvider publishedUrlProvider)
Parameters
Type | Name | Description |
---|---|---|
IContent | content | |
IPublishedRouter | publishedRouter | |
IUmbracoContext | umbracoContext | |
ILocalizationService | localizationService | |
ILocalizedTextService | textService | |
IContentService | contentService | |
IVariationContextAccessor | variationContextAccessor | |
ILogger<IContent> | logger | |
UriUtility | uriUtility | |
IPublishedUrlProvider | publishedUrlProvider |
Returns
Type | Description |
---|---|
Task<IEnumerable<UrlInfo>> |