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)); }
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); }