mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-20 11:45:43 +08:00
Convert null checks to modern ThrowIfNull checks (#2089)
Convert null check to modern ThrowIfNull checks
This commit is contained in:
@@ -12,10 +12,7 @@ public static class MqttConnAckPacketFactory
|
||||
{
|
||||
public static MqttConnAckPacket Create(ValidatingConnectionEventArgs validatingConnectionEventArgs)
|
||||
{
|
||||
if (validatingConnectionEventArgs == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(validatingConnectionEventArgs));
|
||||
}
|
||||
ArgumentNullException.ThrowIfNull(validatingConnectionEventArgs);
|
||||
|
||||
var connAckPacket = new MqttConnAckPacket
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user