V17 - Removed obsoleted code from Umbraco.Extension (#19937)
* Removing obsoleted class GlobalSettingsExtensions.cs * Removing obsoleted methods and usage from ObjectExtensions.cs * Removing a ton of obsoleted methods from PublishedContentExtensions.cs * Removing obsoleted constructors * Removing obsoleted tag on private method that's still in use.
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
using Umbraco.Cms.Core;
|
||||
using Umbraco.Cms.Core.Configuration.Models;
|
||||
using Umbraco.Cms.Core.Hosting;
|
||||
|
||||
namespace Umbraco.Extensions;
|
||||
|
||||
public static class GlobalSettingsExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the absolute path for the Umbraco back office
|
||||
/// </summary>
|
||||
/// <param name="globalSettings"></param>
|
||||
/// <param name="hostingEnvironment"></param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("The UmbracoPath setting is removed, use IHostingEnvironment.GetBackOfficePath() instead. Scheduled for removal in Umbraco 17.")]
|
||||
public static string GetBackOfficePath(this GlobalSettings globalSettings, IHostingEnvironment hostingEnvironment)
|
||||
=> hostingEnvironment.GetBackOfficePath();
|
||||
|
||||
/// <summary>
|
||||
/// This returns the string of the MVC Area route.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This will return the MVC area that we will route all custom routes through like surface controllers, etc...
|
||||
/// We will use the 'Path' (default ~/umbraco) to create it but since it cannot contain '/' and people may specify a
|
||||
/// path of ~/asdf/asdf/admin
|
||||
/// we will convert the '/' to '-' and use that as the path. its a bit lame but will work.
|
||||
/// We also make sure that the virtual directory (SystemDirectories.Root) is stripped off first, otherwise we'd end up
|
||||
/// with something
|
||||
/// like "MyVirtualDirectory-Umbraco" instead of just "Umbraco".
|
||||
/// </remarks>
|
||||
[Obsolete("The UmbracoPath setting is removed, use Constants.System.UmbracoPathSegment as area name instead. Scheduled for removal in Umbraco 17.")]
|
||||
public static string GetUmbracoMvcArea(this GlobalSettings globalSettings, IHostingEnvironment hostingEnvironment)
|
||||
=> Constants.System.UmbracoPathSegment;
|
||||
}
|
||||
@@ -351,7 +351,6 @@ public static class ObjectExtensions
|
||||
return Attempt<object?>.Fail();
|
||||
}
|
||||
|
||||
[Obsolete("This method is no longer used in Umbraco. The method will be removed in Umbraco 17.")]
|
||||
/// <summary>
|
||||
/// Attempts to convert the input string to the output type.
|
||||
/// </summary>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,58 +14,6 @@ namespace Umbraco.Extensions;
|
||||
|
||||
public static class UrlProviderExtensions
|
||||
{
|
||||
[Obsolete("Use the overload with IPublishedStatusFilteringService, scheduled for removal in v17")]
|
||||
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)
|
||||
=> await content.GetContentUrlsAsync(
|
||||
publishedRouter,
|
||||
umbracoContext,
|
||||
languageService,
|
||||
textService,
|
||||
contentService,
|
||||
variationContextAccessor,
|
||||
logger,
|
||||
uriUtility,
|
||||
publishedUrlProvider,
|
||||
StaticServiceProvider.Instance.GetRequiredService<IDocumentNavigationQueryService>(),
|
||||
StaticServiceProvider.Instance.GetRequiredService<IPublishedContentStatusFilteringService>());
|
||||
|
||||
[Obsolete("Use the overload with IPublishedStatusFilteringService, scheduled for removal in v17")]
|
||||
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)
|
||||
=> await content.GetContentUrlsAsync(
|
||||
publishedRouter,
|
||||
umbracoContext,
|
||||
languageService,
|
||||
textService,
|
||||
contentService,
|
||||
variationContextAccessor,
|
||||
logger,
|
||||
uriUtility,
|
||||
publishedUrlProvider,
|
||||
navigationQueryService,
|
||||
StaticServiceProvider.Instance.GetRequiredService<IPublishedContentStatusFilteringService>());
|
||||
|
||||
/// <summary>
|
||||
/// Gets the URLs of the content item.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user