public void Process() { while (true) { if (!m_queue.IsEmpty()) { var vitals = m_queue.Dequeue(); m_vitalsManager.AlertUsers(vitals); PatientAlert alert = m_validator.ValidateVitalsRange(vitals); m_alertManager.AlertUsers(alert); m_vitalsRepository.WriteVitals(vitals); } } }