Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

23 rader
748 B

  1. using System;
  2. using System.Threading.Tasks;
  3. namespace MQTTnet.Core.ManagedClient
  4. {
  5. public static class ManagedMqttClientExtensions
  6. {
  7. public static Task SubscribeAsync(this IManagedMqttClient managedClient, params TopicFilter[] topicFilters)
  8. {
  9. if (managedClient == null) throw new ArgumentNullException(nameof(managedClient));
  10. return managedClient.SubscribeAsync(topicFilters);
  11. }
  12. public static Task UnsubscribeAsync(this IManagedMqttClient managedClient, params TopicFilter[] topicFilters)
  13. {
  14. if (managedClient == null) throw new ArgumentNullException(nameof(managedClient));
  15. return managedClient.UnsubscribeAsync(topicFilters);
  16. }
  17. }
  18. }