From ff29691c313debe21096513dd3bcb0515e0907a7 Mon Sep 17 00:00:00 2001 From: Christian <6939810+chkr1011@users.noreply.github.com> Date: Sat, 19 Aug 2023 15:07:15 +0200 Subject: [PATCH] Apply code style --- .../Options/MqttClientOptionsBuilder.cs | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Source/MQTTnet/Client/Options/MqttClientOptionsBuilder.cs b/Source/MQTTnet/Client/Options/MqttClientOptionsBuilder.cs index a1ba5f480..768d87541 100644 --- a/Source/MQTTnet/Client/Options/MqttClientOptionsBuilder.cs +++ b/Source/MQTTnet/Client/Options/MqttClientOptionsBuilder.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. @@ -61,7 +61,7 @@ public MqttClientOptions Build() { _webSocketOptions.TlsOptions = tlsOptions; } - + if (_proxyOptions != null) { if (_webSocketOptions == null) @@ -127,7 +127,11 @@ public MqttClientOptionsBuilder WithConnectionUri(Uri uri) break; case "mqtts": - WithTcpServer(uri.Host, port).WithTlsOptions(o => {}); + WithTcpServer(uri.Host, port) + .WithTlsOptions( + o => + { + }); break; case "ws": @@ -468,6 +472,12 @@ public MqttClientOptionsBuilder WithWillDelayInterval(uint willDelayInterval) return this; } + public MqttClientOptionsBuilder WithWillMessageExpiryInterval(uint willMessageExpiryInterval) + { + _options.WillMessageExpiryInterval = willMessageExpiryInterval; + return this; + } + public MqttClientOptionsBuilder WithWillPayload(byte[] willPayload) { _options.WillPayload = willPayload; @@ -521,12 +531,6 @@ public MqttClientOptionsBuilder WithWillRetain(bool willRetain = true) return this; } - public MqttClientOptionsBuilder WithWillMessageExpiryInterval(uint willMessageExpiryInterval) - { - _options.WillMessageExpiryInterval = willMessageExpiryInterval; - return this; - } - public MqttClientOptionsBuilder WithWillTopic(string willTopic) { _options.WillTopic = willTopic;