public async Task <T> ReceiveAsync <T>() where T : TelemetryMessage
        {
            var brokeredMsg = await _topicSubscriber.ReceiveFromTopicAsync(TopicNames.Telemetry, typeof(T).Name);

            return(brokeredMsg == null ? null : MessageMapper.Map <T>(brokeredMsg));
        }
Exemplo n.º 2
0
        public async Task <T> ReceiveAsync <T>() where T : NotificationMessage
        {
            var brokeredMsg = await _topicSubscriber.ReceiveFromTopicAsync(TopicNames.Notifications, typeof(T).Name);

            return(brokeredMsg != null?MessageMapper.Map <T>(brokeredMsg) : null);
        }