Fix breaking changes.

This commit is contained in:
Christian Kratky
2017-06-03 22:48:22 +02:00
parent 1317fa3e2a
commit 929cdb971a
92 changed files with 1363 additions and 1309 deletions
+4 -21
View File
@@ -2,11 +2,13 @@
namespace MQTTnet.Core.Client
{
public class MqttClientOptions
public sealed class MqttClientOptions
{
public string Server { get; set; }
public int Port { get; set; } = 1883;
public int? Port { get; set; }
public MqttClientSslOptions SslOptions { get; } = new MqttClientSslOptions();
public string UserName { get; set; }
@@ -19,24 +21,5 @@ namespace MQTTnet.Core.Client
public TimeSpan KeepAlivePeriod { get; set; } = TimeSpan.FromSeconds(5);
public TimeSpan DefaultCommunicationTimeout { get; set; } = TimeSpan.FromSeconds(10);
/// <summary>
/// Use SSL to communicate with the MQTT server.
/// </summary>
/// <remarks>Setting this value to <c>true</c> will also set <see cref="Port"/> to <c>8883</c> if its value was <c>1883</c> (not set).</remarks>
public bool UseSSL
{
get => _useSSL;
set
{
// Automatically set the port to the MQTT SSL port (8883) if it wasn't set already
if (value && Port == 1883)
Port = 8883;
_useSSL = value;
}
}
private bool _useSSL;
}
}