mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-21 04:03:05 +08:00
Convert null checks to modern ThrowIfNull checks (#2089)
Convert null check to modern ThrowIfNull checks
This commit is contained in:
@@ -18,10 +18,7 @@ namespace MQTTnet.Tests.Mockups
|
||||
|
||||
public TestApplicationMessageReceivedHandler(IMqttClient mqttClient)
|
||||
{
|
||||
if (mqttClient == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(mqttClient));
|
||||
}
|
||||
ArgumentNullException.ThrowIfNull(mqttClient);
|
||||
|
||||
mqttClient.ApplicationMessageReceivedAsync += OnApplicationMessageReceivedAsync;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user