using System; using MQTTnet.Core.Client; using MQTTnet.Implementations; namespace MQTTnet { public class MqttClientFactory : IMqttClientFactory { public IMqttClient CreateMqttClient(MqttClientOptions options) { if (options == null) throw new ArgumentNullException(nameof(options)); return new MqttClient(new MqttCommunicationAdapterFactory()); } } }