public List<DataRow> GetOutput(Epi.Core.AnalysisInterpreter.AnalysisRule ifClause, MapDataDelegate trueDelegate, MapDataDelegate falseDelegate) { List<DataRow> result = GetOutput(); int affectedCount = 0; if (DataSet.Tables["Output"] == null) { SyncVariableAndOutputTable(); } if (CurrentDataRow == null) { List<System.Data.DataRow> rows = GetOutput(); foreach (DataRow row in rows) { CurrentDataRow = row; if (ifClause.Execute().ToString().Equals("true", StringComparison.CurrentCultureIgnoreCase)) { trueDelegate(); affectedCount++; } else { falseDelegate(); affectedCount++; } } CurrentDataRow = null; } else { if (ifClause.Execute().ToString().Equals("true", StringComparison.CurrentCultureIgnoreCase)) { trueDelegate(); affectedCount++; } else { falseDelegate(); affectedCount++; } } return result; }
public List<DataRow> GetOutput(MapDataDelegate mapDataDelegate) { List<DataRow> result = null; int affectedCount = 0; if (CurrentDataRow == null) { result = GetOutput(); for (int i = result.Count - 1; i > -1; i--) { CurrentDataRow = result[i]; mapDataDelegate(); affectedCount++; } CurrentDataRow = null; } else { mapDataDelegate(); } return result; }