mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-18 18:43:10 +08:00
Convert null checks to modern ThrowIfNull checks (#2089)
Convert null check to modern ThrowIfNull checks
This commit is contained in:
@@ -14,7 +14,7 @@ namespace MQTTnet.TestApp
|
||||
|
||||
public static void ForwardToConsole(MqttNetEventLogger logger)
|
||||
{
|
||||
if (logger == null) throw new ArgumentNullException(nameof(logger));
|
||||
ArgumentNullException.ThrowIfNull(logger);
|
||||
|
||||
logger.LogMessagePublished -= PrintToConsole;
|
||||
logger.LogMessagePublished += PrintToConsole;
|
||||
|
||||
Reference in New Issue
Block a user