Convert null checks to modern ThrowIfNull checks (#2089)

Convert null check to modern ThrowIfNull checks
This commit is contained in:
Andrea Vouk
2024-10-26 11:41:58 +02:00
committed by GitHub
parent 0506857f0d
commit 63d85184e1
85 changed files with 209 additions and 783 deletions
@@ -65,10 +65,7 @@ namespace MQTTnet.Extensions.Rpc
public async Task<byte[]> ExecuteAsync(string methodName, byte[] payload, MqttQualityOfServiceLevel qualityOfServiceLevel, IDictionary<string, object> parameters = null, CancellationToken cancellationToken = default)
{
if (methodName == null)
{
throw new ArgumentNullException(nameof(methodName));
}
ArgumentNullException.ThrowIfNull(methodName);
var context = new TopicGenerationContext(_mqttClient, _options, methodName, parameters, qualityOfServiceLevel);
var topicNames = _options.TopicGenerationStrategy.CreateRpcTopics(context);