Fix breaking change

This commit is contained in:
Bjarke Berg
2024-02-06 10:08:12 +01:00
parent d090176272
commit cd47bdbb0c

View File

@@ -1,4 +1,6 @@
using Umbraco.Cms.Core.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Hosting;
using Umbraco.Cms.Core.Mapping;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
@@ -12,6 +14,15 @@ public class WebhookMapDefinition : IMapDefinition
private readonly IHostingEnvironment _hostingEnvironment;
private readonly ILocalizedTextService _localizedTextService;
[Obsolete("Use non-obsolete constructor. This will be removed in Umbraco 15.")]
public WebhookMapDefinition() : this(
StaticServiceProvider.Instance.GetRequiredService<IHostingEnvironment>(),
StaticServiceProvider.Instance.GetRequiredService<ILocalizedTextService>()
)
{
}
public WebhookMapDefinition(IHostingEnvironment hostingEnvironment, ILocalizedTextService localizedTextService)
{
_hostingEnvironment = hostingEnvironment;