/// <summary> /// This method can be used to raise ProcessCompleted event. /// This conforms to https://msdn.microsoft.com/en-us/library/w369ty8x.aspx pattern. /// </summary> /// <param name="e"></param> protected virtual void OnProcessCompleted(ProcessCompletedEventArgs e) { // event handler pattern, see: https://msdn.microsoft.com/en-us/library/w369ty8x.aspx var handler = ProcessCompleted; if (null != handler) { handler(this, e); } }
void plugin_ProcessCompleted(object sender, Savonia.Measurements.Providers.Models.ProcessCompletedEventArgs e) { var p = e.MeasurementPackage; Trace.WriteLine(p.Key); foreach (var item in p.Measurements) { Trace.WriteLine(string.Format("{0}: {1}/{2}", item.Timestamp, item.Object, item.Tag)); foreach (var v in item.Data) { Trace.WriteLine(string.Format("\t{0} = {1}", v.Tag, v.Value)); } } }