Ejemplo n.º 1
0
        public override CodegenExpression Make(
            CodegenMethodScope parent,
            SAIFFInitializeSymbol symbols,
            CodegenClassScope classScope)
        {
            var method = parent.MakeChild(typeof(InfraOnMergeActionUpd), this.GetType(), classScope);
            if (_table == null) {
                method.Block.MethodReturn(
                    NewInstance<InfraOnMergeActionUpd>(
                        MakeFilter(method, classScope),
                        _updateHelper.MakeWCopy(method, classScope)));
            }
            else {
                method.Block
                    .DeclareVar<InfraOnMergeActionUpd>(
                        "upd",
                        NewInstance<InfraOnMergeActionUpd>(
                            MakeFilter(method, classScope),
                            _updateHelper.MakeNoCopy(method, classScope),
                            TableDeployTimeResolver.MakeResolveTable(_table, symbols.GetAddInitSvc(method))))
                    .ExprDotMethod(symbols.GetAddInitSvc(method), "AddReadyCallback", Ref("upd"))
                    .MethodReturn(Ref("upd"));
            }

            return LocalMethod(method);
        }
Ejemplo n.º 2
0
 protected override void MakeInlineSpecificSetter(
     CodegenExpressionRef queryMethod,
     CodegenMethod method,
     SAIFFInitializeSymbol symbols,
     CodegenClassScope classScope)
 {
     method.Block.SetProperty(
         queryMethod,
         "OptionalWhereClause",
         whereClause == null
             ? ConstantNull()
             : ExprNodeUtilityCodegen.CodegenEvaluator(whereClause.Forge, method, this.GetType(), classScope));
     if (processor is FireAndForgetProcessorNamedWindowForge) {
         method.Block.SetProperty(
             queryMethod,
             "UpdateHelperNamedWindow",
             updateHelper.MakeWCopy(method, classScope));
     }
     else {
         FireAndForgetProcessorTableForge table = (FireAndForgetProcessorTableForge) processor;
         method.Block
             .SetProperty(queryMethod, "UpdateHelperTable", updateHelper.MakeNoCopy(method, classScope))
             .SetProperty(
                 queryMethod,
                 "Table",
                 TableDeployTimeResolver.MakeResolveTable(table.Table, symbols.GetAddInitSvc(method)));
     }
 }
Ejemplo n.º 3
0
 protected override void InlineInitializeOnTriggerSpecific(
     CodegenExpressionRef saiff,
     CodegenMethod method,
     SAIFFInitializeSymbol symbols,
     CodegenClassScope classScope)
 {
     if (namedWindow != null) {
         method.Block.SetProperty(
             saiff,
             "UpdateHelperNamedWindow",
             updateHelperForge.MakeWCopy(method, classScope));
     }
     else {
         method.Block
             .SetProperty(saiff, "UpdateHelperTable", updateHelperForge.MakeNoCopy(method, classScope));
     }
 }