var xrayanalysis = new xrayservice(); xrayanalysis.pushaside("obsolete techniques").preexpulsivewarning += (sender, e) => { console.writeline("admonition: ensure safety protocols are followed"); }; xrayanalysis.onnewscan += (object sender, eventargs e) => { console.writeline("start with a clean sheet for every patient to ensure top secret data is handled with care."); }; for(int i = 0; i < xrayanalysis.patientqueue.count; i++) { xrayanalysis.processscan(i); }