Use MS Ilogger in LocalizedTextService

This commit is contained in:
Mole
2020-09-21 08:19:26 +02:00
parent 7ad8cd2bf8
commit 30d4233565
9 changed files with 54 additions and 49 deletions

View File

@@ -4,7 +4,7 @@ using System.Globalization;
using System.Linq;
using System.Xml.Linq;
using System.Xml.XPath;
using Umbraco.Core.Logging;
using Microsoft.Extensions.Logging;
namespace Umbraco.Core.Services.Implement
{
@@ -12,7 +12,7 @@ namespace Umbraco.Core.Services.Implement
public class LocalizedTextService : ILocalizedTextService
{
private readonly ILogger _logger;
private readonly ILogger<LocalizedTextService> _logger;
private readonly Lazy<LocalizedTextServiceFileSources> _fileSources;
private readonly IDictionary<CultureInfo, IDictionary<string, IDictionary<string, string>>> _dictionarySource;
private readonly IDictionary<CultureInfo, Lazy<XDocument>> _xmlSource;
@@ -22,7 +22,7 @@ namespace Umbraco.Core.Services.Implement
/// </summary>
/// <param name="fileSources"></param>
/// <param name="logger"></param>
public LocalizedTextService(Lazy<LocalizedTextServiceFileSources> fileSources, ILogger logger)
public LocalizedTextService(Lazy<LocalizedTextServiceFileSources> fileSources, ILogger<LocalizedTextService> logger)
{
if (logger == null) throw new ArgumentNullException("logger");
_logger = logger;
@@ -35,7 +35,7 @@ namespace Umbraco.Core.Services.Implement
/// </summary>
/// <param name="source"></param>
/// <param name="logger"></param>
public LocalizedTextService(IDictionary<CultureInfo, Lazy<XDocument>> source, ILogger logger)
public LocalizedTextService(IDictionary<CultureInfo, Lazy<XDocument>> source, ILogger<LocalizedTextService> logger)
{
if (source == null) throw new ArgumentNullException("source");
if (logger == null) throw new ArgumentNullException("logger");
@@ -48,7 +48,7 @@ namespace Umbraco.Core.Services.Implement
/// </summary>
/// <param name="source"></param>
/// <param name="logger"></param>
public LocalizedTextService(IDictionary<CultureInfo, IDictionary<string, IDictionary<string, string>>> source, ILogger logger)
public LocalizedTextService(IDictionary<CultureInfo, IDictionary<string, IDictionary<string, string>>> source, ILogger<LocalizedTextService> logger)
{
_dictionarySource = source ?? throw new ArgumentNullException(nameof(source));
_logger = logger ?? throw new ArgumentNullException(nameof(logger));