您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

23 行
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. }