@@ -2,7 +2,7 @@ | |||||
namespace MQTTnet.Diagnostics | namespace MQTTnet.Diagnostics | ||||
{ | { | ||||
public class MqttNetLogMessage | |||||
public sealed class MqttNetLogMessage | |||||
{ | { | ||||
public string LogId { get; set; } | public string LogId { get; set; } | ||||
@@ -46,7 +46,10 @@ namespace MQTTnet.Tests.Mockups | |||||
ServerLogger.LogMessagePublished += (s, e) => | ServerLogger.LogMessagePublished += (s, e) => | ||||
{ | { | ||||
Debug.WriteLine(e.LogMessage.ToString()); | |||||
if (Debugger.IsAttached) | |||||
{ | |||||
Debug.WriteLine(e.LogMessage.ToString()); | |||||
} | |||||
if (e.LogMessage.Level == MqttNetLogLevel.Error) | if (e.LogMessage.Level == MqttNetLogLevel.Error) | ||||
{ | { | ||||
@@ -59,7 +62,10 @@ namespace MQTTnet.Tests.Mockups | |||||
ClientLogger.LogMessagePublished += (s, e) => | ClientLogger.LogMessagePublished += (s, e) => | ||||
{ | { | ||||
Debug.WriteLine(e.LogMessage.ToString()); | |||||
if (Debugger.IsAttached) | |||||
{ | |||||
Debug.WriteLine(e.LogMessage.ToString()); | |||||
} | |||||
if (e.LogMessage.Level == MqttNetLogLevel.Error) | if (e.LogMessage.Level == MqttNetLogLevel.Error) | ||||
{ | { | ||||
@@ -135,6 +135,7 @@ namespace MQTTnet.Tests.Mockups | |||||
public void Dispose() | public void Dispose() | ||||
{ | { | ||||
Implementation.Dispose(); | |||||
} | } | ||||
} | } | ||||
} | } |
@@ -15,6 +15,7 @@ using System.Linq; | |||||
using System.Text; | using System.Text; | ||||
using System.Threading; | using System.Threading; | ||||
using System.Threading.Tasks; | using System.Threading.Tasks; | ||||
using MQTTnet.Diagnostics; | |||||
using MQTTnet.Formatter; | using MQTTnet.Formatter; | ||||
namespace MQTTnet.Tests | namespace MQTTnet.Tests | ||||