Exemplo n.º 1
0
 private async Task SendCovidNotificion(IPatient patient)
 {
     if (!string.IsNullOrWhiteSpace(patient?.EmailAddress) && patient.TestCovid.HasValue)
     {
         await _busSender.SendMessage(MessagePayloadFactory.Create(MessageType.CovidNotification, patient.EmailAddress));
     }
 }
Exemplo n.º 2
0
        protected override async Task HandleMassage(Message message, CancellationToken cancellationToken)
        {
            var baseMessage = MessagePayloadFactory.GetMessage(message, _serializerSettings);

            await _messageHandler.HandleMessage(baseMessage, _serializerSettings);

            // handle errors in message handler
            await _queueClient.CompleteAsync(message.SystemProperties.LockToken);
        }