Skip to content

Commit

Permalink
Apply code style
Browse files Browse the repository at this point in the history
  • Loading branch information
chkr1011 committed Aug 19, 2023
1 parent e048b50 commit ff29691
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions Source/MQTTnet/Client/Options/MqttClientOptionsBuilder.cs
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -61,7 +61,7 @@ public MqttClientOptions Build()
{
_webSocketOptions.TlsOptions = tlsOptions;
}

if (_proxyOptions != null)

Check warning on line 65 in Source/MQTTnet/Client/Options/MqttClientOptionsBuilder.cs

View workflow job for this annotation

GitHub Actions / build

'MqttClientOptionsBuilder._proxyOptions' is obsolete

Check warning on line 65 in Source/MQTTnet/Client/Options/MqttClientOptionsBuilder.cs

View workflow job for this annotation

GitHub Actions / build

'MqttClientOptionsBuilder._proxyOptions' is obsolete
{
if (_webSocketOptions == null)
Expand Down Expand Up @@ -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":
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ff29691

Please sign in to comment.