mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-19 19:13:11 +08:00
Convert null checks to modern ThrowIfNull checks (#2089)
Convert null check to modern ThrowIfNull checks
This commit is contained in:
@@ -48,10 +48,7 @@ public sealed class MqttConnectedClient : IDisposable
|
||||
Endpoint = channelAdapter.Endpoint;
|
||||
Session = session ?? throw new ArgumentNullException(nameof(session));
|
||||
|
||||
if (logger == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(logger));
|
||||
}
|
||||
ArgumentNullException.ThrowIfNull(logger);
|
||||
|
||||
_logger = logger.WithSource(nameof(MqttConnectedClient));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user