From f7175c4c2c0965779134536dd54012da291bca32 Mon Sep 17 00:00:00 2001 From: Timerix22 Date: Thu, 17 Nov 2022 21:41:30 +0600 Subject: [PATCH] Microsoft -> DependencyInjection --- .../{Microsoft => DependencyInjection}/LoggerService.cs | 8 +++++--- .../{Microsoft => DependencyInjection}/MyLoggerWrapper.cs | 5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) rename DTLib.Logging/{Microsoft => DependencyInjection}/LoggerService.cs (50%) rename DTLib.Logging/{Microsoft => DependencyInjection}/MyLoggerWrapper.cs (86%) diff --git a/DTLib.Logging/Microsoft/LoggerService.cs b/DTLib.Logging/DependencyInjection/LoggerService.cs similarity index 50% rename from DTLib.Logging/Microsoft/LoggerService.cs rename to DTLib.Logging/DependencyInjection/LoggerService.cs index 0845964..c544609 100644 --- a/DTLib.Logging/Microsoft/LoggerService.cs +++ b/DTLib.Logging/DependencyInjection/LoggerService.cs @@ -1,12 +1,14 @@ using Microsoft.Extensions.DependencyInjection; -namespace DTLib.Logging.New.Microsoft; +namespace DTLib.Logging.DependencyInjection; public class LoggerService : ServiceDescriptor { - ILogger _logger; + DTLib.Logging.New.ILogger _logger; - public LoggerService(DTLib.Logging.New.ILogger logger) : base( typeof(ILogger), new MyLoggerWrapper(logger)) + public LoggerService(DTLib.Logging.New.ILogger logger) : base( + typeof(Microsoft.Extensions.Logging.ILogger), + new MyLoggerWrapper(logger)) { _logger = logger; } diff --git a/DTLib.Logging/Microsoft/MyLoggerWrapper.cs b/DTLib.Logging/DependencyInjection/MyLoggerWrapper.cs similarity index 86% rename from DTLib.Logging/Microsoft/MyLoggerWrapper.cs rename to DTLib.Logging/DependencyInjection/MyLoggerWrapper.cs index 251f96b..d095122 100644 --- a/DTLib.Logging/Microsoft/MyLoggerWrapper.cs +++ b/DTLib.Logging/DependencyInjection/MyLoggerWrapper.cs @@ -1,8 +1,9 @@ +using DTLib.Logging.New; using Microsoft.Extensions.Logging; -namespace DTLib.Logging.New.Microsoft; +namespace DTLib.Logging.DependencyInjection; -public class MyLoggerWrapper : global::Microsoft.Extensions.Logging.ILogger +public class MyLoggerWrapper : Microsoft.Extensions.Logging.ILogger { private DTLib.Logging.New.ILogger _logger; public MyLoggerWrapper(DTLib.Logging.New.ILogger logger)=>