26 lines
717 B
C#
26 lines
717 B
C#
namespace Bts.SharedStreams.FunctionEvaluators;
|
|
|
|
using BCG;
|
|
|
|
using bts.BlueOrb;
|
|
|
|
using Bts.DataStreamCore;
|
|
|
|
using mbts.utils;
|
|
|
|
public class TableApplyEvaluator : ExtensionFunctionEvaluator<IBlueRowCollection> {
|
|
public TableApplyEvaluator() {
|
|
AddOverload<IFunctionEvaluator>("apply", Apply);
|
|
|
|
IBlueRowCollection Apply(IBlueRowCollection rows, IFunctionEvaluator applyFn) {
|
|
var tableOut = new ApplyTable(rows, null, ApplyWrapper);
|
|
return tableOut;
|
|
|
|
IBlueRow ApplyWrapper(IBlueRow inputRow) {
|
|
var res = applyFn.Evaluate(string.Empty, new StreamArgument[] { (null, 0, inputRow) });
|
|
return ExceptionAssert.of_type<IBlueRow>(res);
|
|
}
|
|
}
|
|
}
|
|
}
|