private async Task SendORUs(int count) { var exams = Exam.GetRandomExamsWithPhysicians(count); foreach (var exam in exams) { await SendMessageAsync(MessageGenerator.GetResultMessageFromExam(exam)).ConfigureAwait(true); } }
private async Task SendADTs(int count) { var patients = Patient.GetRandomPatients(count); foreach (var patient in patients) { await SendMessageAsync(MessageGenerator.GetMessageFromPatient(patient)).ConfigureAwait(true); } }
private async Task ProcessMessage(int internalMessageID, Message message) { Log.CoreLogger.Debug("Generating ACK for message received on port " + _port); AckMessage ackMessage = MessageGenerator.GetAckMessage(message.MessageID, AckType.AA); await SendAck(internalMessageID, ackMessage).ConfigureAwait(false); Log.CoreLogger.Debug("ACK sent for message received on port " + _port); // send message upstream }
private async Task SendPatientMessages(int count) { var patients = Patient.GetRandomPatients(count); foreach (var patient in patients) { await SendMessageAsync(MessageGenerator.GetMessageFromPatient(patient)).ConfigureAwait(true); var exam = new Exam(patient); await SendMessageAsync(MessageGenerator.GetMessageFromExam(exam)).ConfigureAwait(true); await SendMessageAsync(MessageGenerator.GetResultMessageFromExam(exam)).ConfigureAwait(true); } }