mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-24 14:43:04 +08:00
Convert null checks to modern ThrowIfNull checks (#2089)
Convert null check to modern ThrowIfNull checks
This commit is contained in:
@@ -11,10 +11,7 @@ public static class MqttUnsubscribePacketFactory
|
||||
{
|
||||
public static MqttUnsubscribePacket Create(MqttClientUnsubscribeOptions clientUnsubscribeOptions)
|
||||
{
|
||||
if (clientUnsubscribeOptions == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(clientUnsubscribeOptions));
|
||||
}
|
||||
ArgumentNullException.ThrowIfNull(clientUnsubscribeOptions);
|
||||
|
||||
var packet = new MqttUnsubscribePacket
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user