mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-23 22:04:43 +08:00
Fix several bugs
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
using System;
|
||||
using MQTTnet.Core.Client;
|
||||
using MQTTnet.Core.Client;
|
||||
using MQTTnet.Implementations;
|
||||
|
||||
namespace MQTTnet
|
||||
{
|
||||
public class MqttClientFactory : IMqttClientFactory
|
||||
{
|
||||
public IMqttClient CreateMqttClient(MqttClientOptions options)
|
||||
public IMqttClient CreateMqttClient()
|
||||
{
|
||||
if (options == null) throw new ArgumentNullException(nameof(options));
|
||||
|
||||
return new MqttClient(new MqttCommunicationAdapterFactory());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
using System;
|
||||
using MQTTnet.Core.Client;
|
||||
using MQTTnet.Core.Client;
|
||||
using MQTTnet.Implementations;
|
||||
|
||||
namespace MQTTnet
|
||||
{
|
||||
public class MqttClientFactory : IMqttClientFactory
|
||||
{
|
||||
public IMqttClient CreateMqttClient(MqttClientOptions options)
|
||||
public IMqttClient CreateMqttClient()
|
||||
{
|
||||
if (options == null) throw new ArgumentNullException(nameof(options));
|
||||
|
||||
return new MqttClient(new MqttCommunicationAdapterFactory());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace MQTTnet.Implementations
|
||||
public Stream ReceiveStream { get; private set; }
|
||||
public Stream RawReceiveStream { get; private set; }
|
||||
|
||||
public Func<MqttClientTcpOptions, IEnumerable<ChainValidationResult>> CustomIgnorableServerCertificateErrorsResolver { get; set; }
|
||||
public static Func<MqttClientTcpOptions, IEnumerable<ChainValidationResult>> CustomIgnorableServerCertificateErrorsResolver { get; set; }
|
||||
|
||||
public async Task ConnectAsync()
|
||||
{
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
using System;
|
||||
using MQTTnet.Core.Client;
|
||||
using MQTTnet.Core.Client;
|
||||
using MQTTnet.Implementations;
|
||||
|
||||
namespace MQTTnet
|
||||
{
|
||||
public class MqttClientFactory : IMqttClientFactory
|
||||
{
|
||||
public IMqttClient CreateMqttClient(MqttClientOptions options)
|
||||
public IMqttClient CreateMqttClient()
|
||||
{
|
||||
if (options == null) throw new ArgumentNullException(nameof(options));
|
||||
|
||||
return new MqttClient(new MqttCommunicationAdapterFactory());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user