Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

20 rindas
650 B

  1. using MQTTnet.Core.Client;
  2. using MQTTnet.Core.Diagnostics;
  3. using MQTTnet.Core.ManagedClient;
  4. using MQTTnet.Implementations;
  5. namespace MQTTnet
  6. {
  7. public class MqttClientFactory : IMqttClientFactory
  8. {
  9. public IMqttClient CreateMqttClient(IMqttNetTraceHandler traceHandler = null)
  10. {
  11. return new MqttClient(new MqttCommunicationAdapterFactory(), new MqttNetTrace(traceHandler));
  12. }
  13. public ManagedMqttClient CreateManagedMqttClient(IMqttNetTraceHandler traceHandler = null)
  14. {
  15. return new ManagedMqttClient(new MqttCommunicationAdapterFactory(), new MqttNetTrace());
  16. }
  17. }
  18. }