Ejemplo n.º 1
0
        public static CodegenExpression Codegen(
            PropertyDotNonLambdaMappedForge forge,
            CodegenMethodScope codegenMethodScope,
            ExprForgeCodegenSymbol exprSymbol,
            CodegenClassScope codegenClassScope)
        {
            CodegenMethod methodNode = codegenMethodScope.MakeChild(
                forge.EvaluationType,
                typeof(PropertyDotNonLambdaMappedForgeEval),
                codegenClassScope);

            CodegenExpressionRef refEPS = exprSymbol.GetAddEPS(methodNode);
            methodNode.Block
                .DeclareVar<EventBean>("@event", ArrayAtIndex(refEPS, Constant(forge.StreamId)))
                .IfRefNullReturnNull("@event")
                .DeclareVar<string>(
                    "key",
                    forge.ParamForge.EvaluateCodegen(typeof(string), methodNode, exprSymbol, codegenClassScope))
                .MethodReturn(
                    forge.MappedGetter.EventBeanGetMappedCodegen(
                        methodNode,
                        codegenClassScope,
                        Ref("@event"),
                        Ref("key")));
            return LocalMethod(methodNode);
        }
Ejemplo n.º 2
0
 public PropertyDotNonLambdaMappedForgeEval(
     PropertyDotNonLambdaMappedForge forge,
     ExprEvaluator paramEval)
 {
     this.forge = forge;
     this.paramEval = paramEval;
 }