Example #1
0
        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);
        }
Example #2
0
        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();
        }
Example #3
0
 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);
 }
Example #4
0
 public static INewCEPExpression <object> Input(Func <object, object> GenerateInputFunc, INewCEPExpression exprToSendInputTo)
 {
     return(Yolo.Express().Input(GenerateInputFunc, exprToSendInputTo));
 }