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.

MqttCommunicationAdapterFactory.cs 731 B

7 years ago
7 years ago
1234567891011121314151617181920212223242526
  1. using MQTTnet.Core.Adapter;
  2. using MQTTnet.Core.Channel;
  3. using MQTTnet.Core.Client;
  4. namespace MQTTnet.Core.Tests
  5. {
  6. public class MqttCommunicationAdapterFactory : IMqttCommunicationAdapterFactory
  7. {
  8. private readonly IMqttCommunicationAdapter _adapter;
  9. public MqttCommunicationAdapterFactory(IMqttCommunicationAdapter adapter)
  10. {
  11. _adapter = adapter;
  12. }
  13. public IMqttCommunicationAdapter CreateClientMqttCommunicationAdapter(IMqttClientOptions options)
  14. {
  15. return _adapter;
  16. }
  17. public IMqttCommunicationAdapter CreateServerMqttCommunicationAdapter(IMqttCommunicationChannel channel)
  18. {
  19. return _adapter;
  20. }
  21. }
  22. }