based on @webpaul's suggestion check out these convenience operations:
public abstract class StronglyTypedOperation<TInput> :
StronglyTypedOperation<TInput, TInput>
{
}
public abstract class StronglyTypedOperation<TInput, TOutput> :
AbstractOperation
{
public override IEnumerable<Row> Execute(IEnumerable<Row>
rows)
{
IEnumerable<TInput> inputs = from row in rows select
(TInput)row["object"];
IEnumerable<TOutput> outputs = Process(inputs);
return from row in outputs select new Row{{ "object",
row }};
}
protected abstract IEnumerable<TOutput> Process
(IEnumerable<TInput> rows);
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---