public static INewCEPExpression <object> Input(this INewCEPExpression <object> expr, Func <object, object> action, INewCEPExpression exprToAttachTo) { //Do block logic here BaseInputAdapter adapter = new BaseInputAdapter(); var perfExpress = Yolo.Express().Perform(x => adapter.Send(action(x))); adapter.Attach(exprToAttachTo as INewComponent); adapter.Send(action(new object())); return(perfExpress); }
public YoloEnumerable() { outputBlock = BlockFactory.CreateLambdaBlock <CollectionOp <T> >(x => true, "YoloEnumerableOutput"); firstBlock = BlockFactory.CreateCollectionBlock <T>(outputBlock); ExprTree.CreateComponent(this, firstBlock); ExprTree.CreateIndependentBlock(outputBlock); input.Attach(this); Yolo.DumpGraph(); }
public void SetFunction(Action <DataType> func, INewComponent comp) { RecvFunction = func; if (mainExprFunc == null) { mainExprFunc = Yolo.Express <DataType>().Name("OutputAdapterFunc").Perform(x => func(x)); } else { mainExprFunc.Perform(x => func(x)); } comp.Attach(mainExprFunc); }
public static INewCEPExpression <object> Input(Func <object, object> GenerateInputFunc, INewCEPExpression exprToSendInputTo) { return(Yolo.Express().Input(GenerateInputFunc, exprToSendInputTo)); }