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