V17 - Removed obsoleted code from Umbraco.Infrastructure (#19977)

* Removing obsoleted code from MigrationPlanExecutor.cs & Interface

* Removing obsoleted code from EmailAddressPropertyEditor.cs

* Removing obsoleted class CacheRebuilder.cs

* Removing obsoleted code from TextBuilder.cs

* Removing obsoleted class ICacheRebuilder.cs

* Removing obsoleted code from SerilogLogger.cs

* Removing the use of Infrastructure IBackgroundTaskQueue.cs and replacing usage with the Core replacement

* Removing obsoleted code from the FileUploadPropertyEditor.cs

* Removing obsoleted code from BlockValuePropertyValueEditorBase.cs

* Removing obsoleted constructors and methods from MultiNodeTreePickerPropertyEditor.cs and TextHeaderWriter.cs

* Removing obsoleted code from CacheInstructionService.cs

* Bumping obsoleted code from MigrationBase.cs to V18

* Removing obsoleted code from EmailSender.cs

* Removing obsoleted code from BlockEditorVarianceHandler.cs

* Removing obsoleted code from IBackOfficeApplicationManager.cs

* Removing obsoleted code from RedirectTracker.cs & RichTextEditorPastedImages.cs
This commit is contained in:
Nicklas Kramer
2025-08-22 14:38:27 +02:00
committed by GitHub
parent 0b2a247614
commit 50ae48b0a2
26 changed files with 6 additions and 447 deletions

View File

@@ -234,9 +234,6 @@ public static partial class UmbracoBuilderExtensions
// We can simplify this registration once the obsolete IBackgroundTaskQueue is removed.
builder.Services.AddSingleton<HostedServices.BackgroundTaskQueue>();
builder.Services.AddSingleton<IBackgroundTaskQueue>(s => s.GetRequiredService<HostedServices.BackgroundTaskQueue>());
#pragma warning disable CS0618 // Type or member is obsolete
builder.Services.AddSingleton<HostedServices.IBackgroundTaskQueue>(s => s.GetRequiredService<HostedServices.BackgroundTaskQueue>());
#pragma warning restore CS0618 // Type or member is obsolete
builder.Services.AddTransient<IFireAndForgetRunner, FireAndForgetRunner>();

View File

@@ -1,4 +1,5 @@
using System.Collections.Concurrent;
using Umbraco.Cms.Core.HostedServices;
namespace Umbraco.Cms.Infrastructure.HostedServices;
@@ -8,9 +9,7 @@ namespace Umbraco.Cms.Infrastructure.HostedServices;
/// <remarks>
/// Borrowed from https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/hosted-services?view=aspnetcore-5.0
/// </remarks>
#pragma warning disable CS0618 // Type or member is obsolete
public class BackgroundTaskQueue : IBackgroundTaskQueue
#pragma warning restore CS0618 // Type or member is obsolete
{
private readonly SemaphoreSlim _signal = new(0);

View File

@@ -1,21 +0,0 @@
namespace Umbraco.Cms.Infrastructure.HostedServices;
/// <summary>
/// A Background Task Queue, to enqueue tasks for executing in the background.
/// </summary>
/// <remarks>
/// Borrowed from https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/hosted-services?view=aspnetcore-5.0
/// </remarks>
[Obsolete("This has been relocated into Umbraco.Cms.Core. This definition in Umbraco.Cms.Infrastructure is scheduled for removal in Umbraco 17.")]
public interface IBackgroundTaskQueue : Core.HostedServices.IBackgroundTaskQueue
{
/// <summary>
/// Enqueue a work item to be executed in the background.
/// </summary>
void QueueBackgroundWorkItem(Func<CancellationToken, Task> workItem);
/// <summary>
/// Dequeue the first item on the queue.
/// </summary>
Task<Func<CancellationToken, Task>?> DequeueAsync(CancellationToken cancellationToken);
}

View File

@@ -1,5 +1,6 @@
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Umbraco.Cms.Core.HostedServices;
namespace Umbraco.Cms.Infrastructure.HostedServices;

View File

@@ -19,33 +19,8 @@ public class SerilogLogger : IDisposable
public ILogger SerilogLog { get; }
[Obsolete("Scheduled for removal in Umbraco 17.")]
public static SerilogLogger CreateWithDefaultConfiguration(
IHostingEnvironment hostingEnvironment,
ILoggingConfiguration loggingConfiguration,
IConfiguration configuration) =>
CreateWithDefaultConfiguration(hostingEnvironment, loggingConfiguration, configuration, out _);
public void Dispose() => (SerilogLog as IDisposable)?.Dispose();
/// <summary>
/// Creates a logger with some pre-defined configuration and remainder from config file
/// </summary>
/// <remarks>Used by UmbracoApplicationBase to get its logger.</remarks>
[Obsolete("Scheduled for removal in Umbraco 17.")]
public static SerilogLogger CreateWithDefaultConfiguration(
IHostingEnvironment hostingEnvironment,
ILoggingConfiguration loggingConfiguration,
IConfiguration configuration,
out UmbracoFileConfiguration umbracoFileConfig)
{
LoggerConfiguration? serilogConfig = new LoggerConfiguration()
.MinimalConfiguration(hostingEnvironment, loggingConfiguration, configuration, out umbracoFileConfig)
.ReadFrom.Configuration(configuration);
return new SerilogLogger(serilogConfig);
}
public bool IsEnabled(Type reporting, LogLevel level)
=> LoggerFor(reporting).IsEnabled(MapLevel(level));

View File

@@ -2,13 +2,11 @@
// See LICENSE for more details.
using MailKit.Net.Smtp;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using MimeKit;
using MimeKit.IO;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Events;
using Umbraco.Cms.Core.Mail;
using Umbraco.Cms.Core.Models.Email;
@@ -30,32 +28,6 @@ public class EmailSender : IEmailSender
private GlobalSettings _globalSettings;
private readonly IEmailSenderClient _emailSenderClient;
[Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")]
public EmailSender(
ILogger<EmailSender> logger,
IOptionsMonitor<GlobalSettings> globalSettings,
IEventAggregator eventAggregator)
: this(logger, globalSettings, eventAggregator,null, null)
{
}
[Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")]
public EmailSender(
ILogger<EmailSender> logger,
IOptionsMonitor<GlobalSettings> globalSettings,
IEventAggregator eventAggregator,
INotificationHandler<SendEmailNotification>? handler1,
INotificationAsyncHandler<SendEmailNotification>? handler2)
{
_logger = logger;
_eventAggregator = eventAggregator;
_globalSettings = globalSettings.CurrentValue;
_notificationHandlerRegistered = handler1 is not null || handler2 is not null;
_emailSenderClient = StaticServiceProvider.Instance.GetRequiredService<IEmailSenderClient>();
globalSettings.OnChange(x => _globalSettings = x);
}
[ActivatorUtilitiesConstructor]
public EmailSender(
ILogger<EmailSender> logger,
IOptionsMonitor<GlobalSettings> globalSettings,

View File

@@ -1,13 +1,9 @@
using Umbraco.Cms.Infrastructure.Migrations;
using Umbraco.Extensions;
namespace Umbraco.Cms.Core.Migrations;
public interface IMigrationPlanExecutor
{
[Obsolete("Use ExecutePlan instead. Scheduled for removal in Umbraco 17.")]
string Execute(MigrationPlan plan, string fromState);
/// <summary>
/// Executes the migration plan.
/// </summary>
@@ -19,13 +15,7 @@ public interface IMigrationPlanExecutor
/// <para>A plan can complete partially, the changes of each completed migration will be saved.</para>
/// </remarks>
[Obsolete("Use ExecutePlanAsync instead. Scheduled for removal in Umbraco 18.")]
ExecutedMigrationPlan ExecutePlan(MigrationPlan plan, string fromState)
{
var state = Execute(plan, fromState);
// We have no real way of knowing whether it was successfull or not here, assume true.
return new ExecutedMigrationPlan(plan, fromState, state, true, plan.Transitions.Select(x => x.Value).WhereNotNull().ToList());
}
ExecutedMigrationPlan ExecutePlan(MigrationPlan plan, string fromState);
/// <summary>
/// Executes the migration plan asynchronously.

View File

@@ -1,7 +1,7 @@
namespace Umbraco.Cms.Infrastructure.Migrations;
/// <inheritdoc />
[Obsolete("Use AsyncMigrationBase instead. Scheduled for removal in Umbraco 17.")]
[Obsolete("Use AsyncMigrationBase instead. Scheduled for removal in Umbraco 18.")]
public abstract class MigrationBase : AsyncMigrationBase
{
/// <summary>

View File

@@ -1,15 +1,11 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using OpenIddict.Abstractions;
using Org.BouncyCastle.Utilities;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Cache;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Migrations;
using Umbraco.Cms.Core.Models.Membership;
using Umbraco.Cms.Core.PublishedCache;
using Umbraco.Cms.Core.Scoping;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Infrastructure.Persistence;
using Umbraco.Cms.Infrastructure.Scoping;
@@ -79,34 +75,6 @@ public class MigrationPlanExecutor : IMigrationPlanExecutor
_logger = _loggerFactory.CreateLogger<MigrationPlanExecutor>();
}
[Obsolete("Use the non obsoleted constructor instead. Scheduled for removal in v17")]
public MigrationPlanExecutor(
ICoreScopeProvider scopeProvider,
IScopeAccessor scopeAccessor,
ILoggerFactory loggerFactory,
IMigrationBuilder migrationBuilder,
IUmbracoDatabaseFactory databaseFactory,
IDatabaseCacheRebuilder databaseCacheRebuilder,
DistributedCache distributedCache,
IKeyValueService keyValueService,
IServiceScopeFactory serviceScopeFactory)
: this(
scopeProvider,
scopeAccessor,
loggerFactory,
migrationBuilder,
databaseFactory,
databaseCacheRebuilder,
distributedCache,
keyValueService,
serviceScopeFactory,
StaticServiceProvider.Instance.GetRequiredService<AppCaches>())
{
}
[Obsolete("Use ExecutePlan instead. Scheduled for removal in Umbraco 17.")]
public string Execute(MigrationPlan plan, string fromState) => ExecutePlan(plan, fromState).FinalState;
/// <inheritdoc/>
[Obsolete("Use ExecutePlanAsync instead. Scheduled for removal in Umbraco 18.")]
public ExecutedMigrationPlan ExecutePlan(MigrationPlan plan, string fromState) => ExecutePlanAsync(plan, fromState).GetAwaiter().GetResult();

View File

@@ -1,33 +0,0 @@
using Umbraco.Cms.Core.Cache;
using Umbraco.Cms.Core.PublishedCache;
using Umbraco.Extensions;
namespace Umbraco.Cms.Infrastructure.Migrations.PostMigrations;
/// <summary>
/// Implements <see cref="ICacheRebuilder" /> in Umbraco.Web (rebuilding).
/// </summary>
[Obsolete("This is no longer used. Scheduled for removal in Umbraco 17.")]
public class CacheRebuilder : ICacheRebuilder
{
private readonly DistributedCache _distributedCache;
private readonly IDatabaseCacheRebuilder _databaseCacheRebuilder;
/// <summary>
/// Initializes a new instance of the <see cref="CacheRebuilder" /> class.
/// </summary>
public CacheRebuilder(
DistributedCache distributedCache,
IDatabaseCacheRebuilder databaseCacheRebuilder)
{
_distributedCache = distributedCache;
_databaseCacheRebuilder = databaseCacheRebuilder;
}
/// <inheritdoc />
public void Rebuild()
{
_databaseCacheRebuilder.Rebuild(false);
_distributedCache.RefreshAllPublishedSnapshot();
}
}

View File

@@ -1,20 +0,0 @@
namespace Umbraco.Cms.Infrastructure.Migrations.PostMigrations;
/// <summary>
/// Rebuilds the published snapshot.
/// </summary>
/// <remarks>
/// <para>
/// This interface exists because the entire published snapshot lives in Umbraco.Web
/// but we may want to trigger rebuilds from Umbraco.Core. These two assemblies should
/// be refactored, really.
/// </para>
/// </remarks>
[Obsolete("This is no longer used. Scheduled for removal in Umbraco 17.")]
public interface ICacheRebuilder
{
/// <summary>
/// Rebuilds.
/// </summary>
void Rebuild();
}

View File

@@ -47,13 +47,6 @@ public class TextBuilder : Builder
{
}
/// <summary>
/// Outputs an "auto-generated" header to a string builder.
/// </summary>
/// <param name="sb">The string builder.</param>
[Obsolete("Please use the overload taking all parameters. Scheduled for removal in Umbraco 17.")]
public static void WriteHeader(StringBuilder sb) => WriteHeader(sb, true);
/// <summary>
/// Outputs an "auto-generated" header to a string builder.
/// </summary>

View File

@@ -4,13 +4,6 @@ namespace Umbraco.Cms.Infrastructure.ModelsBuilder.Building;
internal static class TextHeaderWriter
{
/// <summary>
/// Outputs an "auto-generated" header to a string builder.
/// </summary>
/// <param name="sb">The string builder.</param>
[Obsolete("Please use the overload taking all parameters. Scheduled for removal in Umbraco 17.")]
public static void WriteHeader(StringBuilder sb) => WriteHeader(sb, true);
/// <summary>
/// Outputs an "auto-generated" header to a string builder.
/// </summary>

View File

@@ -129,9 +129,6 @@ public abstract class BlockValuePropertyValueEditorBase<TValue, TLayout> : DataV
return result;
}
[Obsolete("This method is no longer used within Umbraco. Please use the overload taking all parameters. Scheduled for removal in Umbraco 17.")]
protected void MapBlockValueFromEditor(TValue blockValue) => MapBlockValueFromEditor(blockValue, null, Guid.Empty);
protected void MapBlockValueFromEditor(TValue? editedBlockValue, TValue? currentBlockValue, Guid contentKey)
{
MapBlockItemDataFromEditor(

View File

@@ -1,8 +1,6 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.PropertyEditors.Validators;
using Umbraco.Cms.Core.Services;
@@ -19,17 +17,6 @@ public class EmailAddressPropertyEditor : DataEditor
{
private readonly ILocalizedTextService _localizedTextService;
/// <summary>
/// Initializes a new instance of the <see cref="EmailAddressPropertyEditor"/> class.
/// </summary>
[Obsolete("Please use the constructor taking all parameters. Scheduled for removal in Umbraco 17.")]
public EmailAddressPropertyEditor(IDataValueEditorFactory dataValueEditorFactory)
: this(
dataValueEditorFactory,
StaticServiceProvider.Instance.GetRequiredService<ILocalizedTextService>())
{
}
/// <summary>
/// Initializes a new instance of the <see cref="EmailAddressPropertyEditor"/> class.
/// </summary>

View File

@@ -2,31 +2,18 @@
// See LICENSE for more details.
using System.Diagnostics.CodeAnalysis;
using Microsoft.Extensions.Options;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.Events;
using Umbraco.Cms.Core.IO;
using Umbraco.Cms.Core.Media;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Notifications;
using Umbraco.Cms.Core.Services;
namespace Umbraco.Cms.Core.PropertyEditors;
// TODO (V17):
// - Remove the implementation of INotificationHandler as these have all been refactored out into sepate notification handler classes.
// - Remove the unused parameters from the constructor.
/// <summary>
/// Defines the file upload property editor.
/// </summary>
[DataEditor(
Constants.PropertyEditors.Aliases.UploadField,
ValueEditorIsReusable = true)]
public class FileUploadPropertyEditor : DataEditor, IMediaUrlGenerator,
INotificationHandler<ContentCopiedNotification>, INotificationHandler<ContentDeletedNotification>,
INotificationHandler<MediaDeletedNotification>, INotificationHandler<MediaSavingNotification>,
INotificationHandler<MemberDeletedNotification>
public class FileUploadPropertyEditor : DataEditor, IMediaUrlGenerator
{
private readonly IIOHelper _ioHelper;
@@ -35,10 +22,6 @@ public class FileUploadPropertyEditor : DataEditor, IMediaUrlGenerator,
/// </summary>
public FileUploadPropertyEditor(
IDataValueEditorFactory dataValueEditorFactory,
MediaFileManager mediaFileManager,
IOptionsMonitor<ContentSettings> contentSettings,
UploadAutoFillProperties uploadAutoFillProperties,
IContentService contentService,
IIOHelper ioHelper)
: base(dataValueEditorFactory)
{
@@ -71,44 +54,4 @@ public class FileUploadPropertyEditor : DataEditor, IMediaUrlGenerator,
/// <returns>The corresponding property value editor.</returns>
protected override IDataValueEditor CreateValueEditor()
=> DataValueEditorFactory.Create<FileUploadPropertyValueEditor>(Attribute!);
#region Obsolete notification handler notifications
/// <inheritdoc/>
[Obsolete("This handler is no longer registered. Logic has been migrated to FileUploadContentCopiedNotificationHandler. Scheduled for removal in Umbraco 17.")]
public void Handle(ContentCopiedNotification notification)
{
// This handler is no longer registered. Logic has been migrated to FileUploadContentCopiedNotificationHandler.
}
/// <inheritdoc/>
[Obsolete("This handler is no longer registered. Logic has been migrated to FileUploadMediaSavingNotificationHandler. Scheduled for removal in Umbraco 17.")]
public void Handle(MediaSavingNotification notification)
{
// This handler is no longer registered. Logic has been migrated to FileUploadMediaSavingNotificationHandler.
}
/// <inheritdoc/>
[Obsolete("This handler is no longer registered. Logic has been migrated to FileUploadContentDeletedNotificationHandler. Scheduled for removal in Umbraco 17.")]
public void Handle(ContentDeletedNotification notification)
{
// This handler is no longer registered. Logic has been migrated to FileUploadContentDeletedNotificationHandler.
}
/// <inheritdoc/>
[Obsolete("This handler is no longer registered. Logic has been migrated to FileUploadMediaDeletedNotificationHandler. Scheduled for removal in Umbraco 17.")]
public void Handle(MediaDeletedNotification notification)
{
// This handler is no longer registered. Logic has been migrated to FileUploadMediaDeletedNotificationHandler.
}
/// <inheritdoc/>
[Obsolete("This handler is no longer registered. Logic has been migrated to FileUploadMemberDeletedNotificationHandler. Scheduled for removal in Umbraco 17.")]
public void Handle(MemberDeletedNotification notification)
{
// This handler is no longer registered. Logic has been migrated to FileUploadMemberDeletedNotificationHandler.
}
#endregion
}

View File

@@ -85,29 +85,6 @@ public class MultiNodeTreePickerPropertyEditor : DataEditor
new ContentTypeValidator(localizedTextService, coreScopeProvider, contentService, mediaService, memberService)));
}
/// <summary>
/// Initializes a new instance of the <see cref="MultiNodeTreePickerPropertyValueEditor"/> class.
/// </summary>
[Obsolete("Please use the constructor taking all parameters. Scheduled for removal in Umbraco 17.")]
public MultiNodeTreePickerPropertyValueEditor(
IShortStringHelper shortStringHelper,
IJsonSerializer jsonSerializer,
IIOHelper ioHelper,
DataEditorAttribute attribute)
: this(
shortStringHelper,
jsonSerializer,
ioHelper,
attribute,
StaticServiceProvider.Instance.GetRequiredService<ILocalizedTextService>(),
StaticServiceProvider.Instance.GetRequiredService<IEntityService>(),
StaticServiceProvider.Instance.GetRequiredService<ICoreScopeProvider>(),
StaticServiceProvider.Instance.GetRequiredService<IContentService>(),
StaticServiceProvider.Instance.GetRequiredService<IMediaService>(),
StaticServiceProvider.Instance.GetRequiredService<IMemberService>())
{
}
/// <inheritdoc/>
public IEnumerable<UmbracoEntityReference> GetReferences(object? value)
{

View File

@@ -3,14 +3,9 @@
using HtmlAgilityPack;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Umbraco.Cms.Core.Cache;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Exceptions;
using Umbraco.Cms.Core.Hosting;
using Umbraco.Cms.Core.IO;
using Umbraco.Cms.Core.Media;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Membership;
@@ -18,7 +13,6 @@ using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Models.TemporaryFile;
using Umbraco.Cms.Core.Routing;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Strings;
using Umbraco.Cms.Core.Web;
using Umbraco.Cms.Infrastructure.Scoping;
using Umbraco.Extensions;
@@ -38,48 +32,6 @@ public sealed class RichTextEditorPastedImages
private readonly AppCaches _appCaches;
private readonly IUserService _userService;
[Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")]
public RichTextEditorPastedImages(
IUmbracoContextAccessor umbracoContextAccessor,
ILogger<RichTextEditorPastedImages> logger,
IHostingEnvironment hostingEnvironment,
IMediaService mediaService,
IContentTypeBaseServiceProvider contentTypeBaseServiceProvider,
MediaFileManager mediaFileManager,
MediaUrlGeneratorCollection mediaUrlGenerators,
IShortStringHelper shortStringHelper,
IPublishedUrlProvider publishedUrlProvider,
ITemporaryFileService temporaryFileService,
IScopeProvider scopeProvider,
IMediaImportService mediaImportService,
IImageUrlGenerator imageUrlGenerator,
IOptions<ContentSettings> contentSettings,
IEntityService entityService,
AppCaches appCaches)
: this(umbracoContextAccessor, publishedUrlProvider, temporaryFileService, scopeProvider, mediaImportService, imageUrlGenerator, entityService, appCaches)
{
}
[Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")]
public RichTextEditorPastedImages(
IUmbracoContextAccessor umbracoContextAccessor,
IPublishedUrlProvider publishedUrlProvider,
ITemporaryFileService temporaryFileService,
IScopeProvider scopeProvider,
IMediaImportService mediaImportService,
IImageUrlGenerator imageUrlGenerator)
: this(
umbracoContextAccessor,
publishedUrlProvider,
temporaryFileService,
scopeProvider,
mediaImportService,
imageUrlGenerator,
StaticServiceProvider.Instance.GetRequiredService<IEntityService>(),
StaticServiceProvider.Instance.GetRequiredService<AppCaches>())
{
}
public RichTextEditorPastedImages(
IUmbracoContextAccessor umbracoContextAccessor,
IPublishedUrlProvider publishedUrlProvider,

View File

@@ -17,18 +17,6 @@ public sealed class BlockEditorVarianceHandler
_contentTypeService = contentTypeService;
}
[Obsolete("Please use the method that allows alignment for a collection of values. Scheduled for removal in V17.")]
public async Task AlignPropertyVarianceAsync(BlockPropertyValue blockPropertyValue, IPropertyType propertyType, string? culture)
{
culture ??= await _languageService.GetDefaultIsoCodeAsync();
if (propertyType.VariesByCulture() != VariesByCulture(blockPropertyValue))
{
blockPropertyValue.Culture = propertyType.VariesByCulture()
? culture
: null;
}
}
/// <summary>
/// Aligns a collection of block property values for variance changes.
/// </summary>

View File

@@ -1,8 +1,6 @@
using System.Diagnostics.CodeAnalysis;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.PublishedCache;
@@ -41,47 +39,6 @@ namespace Umbraco.Cms.Infrastructure.Routing
_publishedContentStatusFilteringService = publishedContentStatusFilteringService;
}
[Obsolete("Use the non-obsolete constructor. Scheduled for removal in V17.")]
public RedirectTracker(
IVariationContextAccessor variationContextAccessor,
ILocalizationService localizationService,
IRedirectUrlService redirectUrlService,
IPublishedContentCache contentCache,
IDocumentNavigationQueryService navigationQueryService,
ILogger<RedirectTracker> logger,
IPublishedUrlProvider publishedUrlProvider,
IPublishedContentStatusFilteringService publishedContentStatusFilteringService)
: this(
localizationService,
redirectUrlService,
contentCache,
navigationQueryService,
logger,
publishedUrlProvider,
publishedContentStatusFilteringService)
{
}
[Obsolete("Use the non-obsolete constructor. Scheduled for removal in V17.")]
public RedirectTracker(
IVariationContextAccessor variationContextAccessor,
ILocalizationService localizationService,
IRedirectUrlService redirectUrlService,
IPublishedContentCache contentCache,
IDocumentNavigationQueryService navigationQueryService,
ILogger<RedirectTracker> logger,
IPublishedUrlProvider publishedUrlProvider)
: this(
localizationService,
redirectUrlService,
contentCache,
navigationQueryService,
logger,
publishedUrlProvider,
StaticServiceProvider.Instance.GetRequiredService<IPublishedContentStatusFilteringService>())
{
}
/// <inheritdoc/>
public void StoreOldRoute(IContent entity, Dictionary<(int ContentId, string Culture), (Guid ContentKey, string OldRoute)> oldRoutes)
{

View File

@@ -2,9 +2,6 @@
public interface IBackOfficeApplicationManager
{
[Obsolete("Please use the overload that allows for multiple back-office hosts. Will be removed in V17.")]
Task EnsureBackOfficeApplicationAsync(Uri backOfficeUrl, CancellationToken cancellationToken = default);
Task EnsureBackOfficeApplicationAsync(IEnumerable<Uri> backOfficeHosts, CancellationToken cancellationToken = default)
=> Task.CompletedTask;

View File

@@ -135,17 +135,6 @@ namespace Umbraco.Cms
}
}
/// <inheritdoc />
[Obsolete("Use the non-obsolete overload. Scheduled for removal in V17.")]
public ProcessInstructionsResult ProcessInstructions(
CacheRefresherCollection cacheRefreshers,
ServerRole serverRole,
CancellationToken cancellationToken,
string localIdentity,
DateTime lastPruned,
int lastId) =>
ProcessInstructions(cacheRefreshers, cancellationToken, localIdentity, lastId);
private CacheInstruction CreateCacheInstruction(IEnumerable<RefreshInstruction> instructions, string localIdentity)
=> new(
0,