Amend breaking change

This commit is contained in:
Nikolaj Geisle
2022-03-22 13:47:58 +01:00
parent bd8084ac99
commit fe1df8d4ea

View File

@@ -4,8 +4,10 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Umbraco.Cms.Web.Common.DependencyInjection;
namespace Umbraco.Cms.Infrastructure.HostedServices
{
@@ -41,6 +43,13 @@ namespace Umbraco.Cms.Infrastructure.HostedServices
_delay = delay;
}
// Scheduled for removal in V11
[Obsolete("Please use constructor that takes an ILogger instead")]
protected RecurringHostedServiceBase(TimeSpan period, TimeSpan delay)
: this(StaticServiceProvider.Instance.GetRequiredService<ILogger>(), period, delay)
{
}
/// <inheritdoc/>
public Task StartAsync(CancellationToken cancellationToken)
{