예제 #1
0
 public static void Subscribe(this MysoftMqttClient client, IMqttTopic topic, MqttQosLevel qos)
 {
     client.Subscribe(topic.Build(), qos);
 }
        public TopicSubscriber(IMqttTopic topic, MqttQosLevel qos = MqttQosLevel.AtMostOnce, bool shared = false) : this(topic.Build(), qos, shared)
        {

        }
 public static string Build(this IMqttTopic topic, params IMqttTopic[] topics)
 {
     return(topic.Concat(topics).Build());
 }
예제 #4
0
 public MqttTopicBuilder With(IMqttTopic topic)
 {
     _topics.Add(topic);
     return(this);
 }
 public static IEnumerable <IMqttTopic> Concat(this IMqttTopic topic, params IMqttTopic[] topics)
 {
     return(new List <IMqttTopic> {
         topic
     }.Union(topics));
 }