private void bw_DoWork(object sender, DoWorkEventArgs e) { // if there is something to read IEnumerable <SSS.ServicesConfig.data.Reading> readings = Reading.GetUnProcessReadings().ToList(); if (readings.Count() > 0) { OnReadingAvailable(readings); } }