Refactor options

This commit is contained in:
Christian Kratky
2017-10-04 13:58:51 +02:00
parent d23ab88add
commit 67267c05fd
40 changed files with 291 additions and 197 deletions
@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using MQTTnet.Core.Client;
using MQTTnet.Core.Packets;
using MQTTnet.Core.Serializer;
@@ -12,7 +11,7 @@ namespace MQTTnet.Core.Adapter
{
IMqttPacketSerializer PacketSerializer { get; }
Task ConnectAsync(TimeSpan timeout, MqttClientOptions options);
Task ConnectAsync(TimeSpan timeout);
Task DisconnectAsync(TimeSpan timeout);
@@ -26,11 +26,11 @@ namespace MQTTnet.Core.Adapter
public IMqttPacketSerializer PacketSerializer { get; }
public async Task ConnectAsync(TimeSpan timeout, MqttClientOptions options)
public async Task ConnectAsync(TimeSpan timeout)
{
try
{
await _channel.ConnectAsync(options).TimeoutAfter(timeout).ConfigureAwait(false);
await _channel.ConnectAsync().TimeoutAfter(timeout).ConfigureAwait(false);
}
catch (TaskCanceledException)
{