From 4828510ebc3ad4f78d0c2b01b7508b75a9fe9ccc Mon Sep 17 00:00:00 2001 From: Tom Austin Date: Wed, 24 Feb 2021 08:59:16 +0000 Subject: [PATCH] Moved disposes onto ILogger interface so it makes mocking easier --- ElasticLogging/ElasticLogging.cs | 2 +- ElasticLogging/IElasticLogging.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ElasticLogging/ElasticLogging.cs b/ElasticLogging/ElasticLogging.cs index a14266e..059c4fa 100644 --- a/ElasticLogging/ElasticLogging.cs +++ b/ElasticLogging/ElasticLogging.cs @@ -9,7 +9,7 @@ namespace ElasticLogging { - public class Logger : ILogger, IDisposable, IAsyncDisposable + public sealed class Logger : ILogger { private readonly ElasticClient _elasticClient; private readonly string _logName; diff --git a/ElasticLogging/IElasticLogging.cs b/ElasticLogging/IElasticLogging.cs index 3ab4c70..5e068a4 100644 --- a/ElasticLogging/IElasticLogging.cs +++ b/ElasticLogging/IElasticLogging.cs @@ -6,7 +6,7 @@ namespace ElasticLogging { - public interface ILogger + public interface ILogger : IDisposable, IAsyncDisposable { void Debug(string message); Task DebugAsync(string message);