protected internal override void HandleProcessedDataRows(object sender, CursorDataReadProgressChangedArgs e) { // construct data, create eventargs, raise event JsonCreator jc = new JsonCreator(this); List <JObject> list = jc.SerializeRowValues(e.RowValues); var jsonString = "[" + string.Join(",", list.Select(o => o.ToString())) + "]"; // do custom bubbling up ExportProgressChangedArgs args = new ExportProgressChangedArgs( e.RowsProcessed, e.RowsTotal, jsonString); base.OnWriterProgressChanged(args); }
/// <summary> /// Writes json to a temporary file /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected internal override void HandleProcessedDataRows(object sender, CursorDataReadProgressChangedArgs e) { StringBuilder sb = new StringBuilder(); List <JObject> list = _jc.SerializeRowValues(e.RowValues); var jsonString = string.Join(",", list.Select(o => o.ToString())); if (!firstRun && !string.IsNullOrEmpty(jsonString)) { _sw.Write(','); // add record delimiter on any data except first batch } _sw.Write(jsonString); firstRun = false; BubbleUpProgressEvent(e); }