protected virtual void OnMeasurementCompleted(MeasurementCompletedEventArgs e) { MeasurementCompletedEventHandler handler = MeasurementCompleted; if (handler != null) { handler(this, e); } }
public void RunGenerator() { List <decimal?> data = GetTestData(); foreach (decimal?measurement in data) { MeasurementCompletedEventArgs args = new MeasurementCompletedEventArgs(measurement, DateTime.UtcNow); OnMeasurementCompleted(args); Thread.Sleep(2000); } }