You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MqttClientFactory.cs 414 B

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
12345678910111213141516
  1. using System;
  2. using MQTTnet.Core.Client;
  3. using MQTTnet.Implementations;
  4. namespace MQTTnet
  5. {
  6. public class MqttClientFactory : IMqttClientFactory
  7. {
  8. public IMqttClient CreateMqttClient(MqttClientOptions options)
  9. {
  10. if (options == null) throw new ArgumentNullException(nameof(options));
  11. return new MqttClient(new MqttCommunicationAdapterFactory());
  12. }
  13. }
  14. }