From 8bfb8f17570734903f9279ebbedc8e66afa68367 Mon Sep 17 00:00:00 2001 From: Alexandru Macocian Date: Sat, 10 Jul 2021 13:01:47 +0300 Subject: [PATCH] Move logger resolver to System.Logging Nit fixes --- .../Logging/LoggerResolverTests.cs | 1 - .../Configuration/UpdateableOptionsWrapper.cs | 4 ++-- .../Logging/LoggerResolver.cs | 6 +++--- .../SystemExtensions.NetStandard.DependencyInjection.csproj | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/SystemExtensions.DependencyInjection.Tests/Logging/LoggerResolverTests.cs b/SystemExtensions.DependencyInjection.Tests/Logging/LoggerResolverTests.cs index b215ea6..c82aaf2 100644 --- a/SystemExtensions.DependencyInjection.Tests/Logging/LoggerResolverTests.cs +++ b/SystemExtensions.DependencyInjection.Tests/Logging/LoggerResolverTests.cs @@ -4,7 +4,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using System; using System.Logging; -using System.Windows.Extensions.Logging; namespace SystemExtensions.DependencyInjection.Tests.Logging { diff --git a/SystemExtensions.NetStandard.DependencyInjection/Configuration/UpdateableOptionsWrapper.cs b/SystemExtensions.NetStandard.DependencyInjection/Configuration/UpdateableOptionsWrapper.cs index 05d8383..9b0ba3b 100644 --- a/SystemExtensions.NetStandard.DependencyInjection/Configuration/UpdateableOptionsWrapper.cs +++ b/SystemExtensions.NetStandard.DependencyInjection/Configuration/UpdateableOptionsWrapper.cs @@ -1,6 +1,6 @@ -using System.Extensions; +using System.Configuration; -namespace System.Configuration +namespace System.Extensions.Configuration { public sealed class UpdateableOptionsWrapper : IUpdateableOptions where T : class diff --git a/SystemExtensions.NetStandard.DependencyInjection/Logging/LoggerResolver.cs b/SystemExtensions.NetStandard.DependencyInjection/Logging/LoggerResolver.cs index b766b7c..40b9079 100644 --- a/SystemExtensions.NetStandard.DependencyInjection/Logging/LoggerResolver.cs +++ b/SystemExtensions.NetStandard.DependencyInjection/Logging/LoggerResolver.cs @@ -2,7 +2,7 @@ using Slim.Resolvers; using System.Linq; -namespace System.Windows.Extensions.Logging +namespace System.Logging { public sealed class LoggerResolver : IDependencyResolver { @@ -25,7 +25,7 @@ namespace System.Windows.Extensions.Logging } else if (type == typeof(ILogger)) { - return ResolveLogger(serviceProvider, type); + return ResolveLogger(serviceProvider); } else { @@ -41,7 +41,7 @@ namespace System.Windows.Extensions.Logging return createLoggerMethod.MakeGenericMethod(categoryTypes.First()).Invoke(null, new object[] { loggerFactory }); } - private static object ResolveLogger(Slim.IServiceProvider serviceProvider, Type type) + private static object ResolveLogger(Slim.IServiceProvider serviceProvider) { var loggerFactory = serviceProvider.GetService(); return loggerFactory.CreateLogger(string.Empty); diff --git a/SystemExtensions.NetStandard.DependencyInjection/SystemExtensions.NetStandard.DependencyInjection.csproj b/SystemExtensions.NetStandard.DependencyInjection/SystemExtensions.NetStandard.DependencyInjection.csproj index bdc064c..66cf1cc 100644 --- a/SystemExtensions.NetStandard.DependencyInjection/SystemExtensions.NetStandard.DependencyInjection.csproj +++ b/SystemExtensions.NetStandard.DependencyInjection/SystemExtensions.NetStandard.DependencyInjection.csproj @@ -6,7 +6,7 @@ LICENSE true latest - 1.1.0 + 1.1.1 Alexandru Macocian https://github.com/AlexMacocian/SystemExtensions