private void Init(string name) { adapter = new BaseInputAdapter(); LambdaBlock <object> b = Express2.BlockFactory.CreateLambdaBlock <object>(x => true, name); ExprTree.CreateComponent(this, b); adapter.Attach(this); }
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(); }