public static Task UnsubscribeAsync(this IMqttManagedClient managedClient, params string[] topicFilters) { if (managedClient == null) { throw new ArgumentNullException(nameof(managedClient)); } return(managedClient.UnsubscribeAsync(topicFilters)); }
public static Task SubscribeAsync(this IMqttManagedClient managedClient, string topic) { if (managedClient == null) { throw new ArgumentNullException(nameof(managedClient)); } if (topic == null) { throw new ArgumentNullException(nameof(topic)); } return(managedClient.SubscribeAsync(new TopicFilterBuilder().WithTopic(topic).Build())); }