Not sure that would solve any of my issues. Let me take a simpler
example.
In the following, how would I get the rows to be counted, but passed
on to DummyTwo?
Register(new DummyOperation());
Register(new RowCountOperation());
Register(new DummyTwo());
protected override void OnFinishedProcessing(IOperation op)
{
Console.WriteLine(op.Statistics.OutputtedRows); <<<<<<<<
Result is 500,1,1
}
public class DummyOperation : AbstractOperation
{
public override IEnumerable<Row> Execute(IEnumerable<Row>
rows)
{
List<Row> list = new List<Row>();
for (int i = 0; i < 500; i++)
{
Row r = new Row();
r["Id"] = i;
list.Add(r);
}
foreach (Row row in list)
{
yield return row; ;
}
}
}
public class DummyTwo:AbstractOperation
{
public override IEnumerable<Row> Execute(IEnumerable<Row>
rows)
{
foreach (Row row in rows)
{
yield return row;
}
}
}
public class RowCountOperation : AbstractAggregationOperation
{
protected override void Accumulate(Row row, Row aggregate)
{
if (aggregate["count"] == null)
aggregate["count"] = 0;
int count = (int)aggregate["count"];
aggregate["count"] = count + 1;
}
}
--
You received this message because you are subscribed to the Google Groups
"Rhino Tools Dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rhino-tools-dev?hl=en.