private static void ValidateMqttAttribute(MqttAttribute attribute, Type parameterType) { if (string.IsNullOrWhiteSpace(attribute?.TopicName)) { throw new ArgumentException("Value cannot be empty.", nameof(attribute.TopicName)); } }
private IAsyncCollector <MqttMessage> BuildCollectorFromAttribute(MqttAttribute attribute) { var topicName = attribute.TopicName; var client = _messagingProvider.GetMessageClient(topicName); return(new MqttMessageAsyncCollector(client)); }
private MqttMessage BuildMessageFromAttribute(MqttAttribute attribute) { return(new MqttMessage { Topic = attribute.TopicName }); }