public CodegenExpression EvaluateCodegen( Type requiredType, CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) { var result = fragmentType.IsIndexed ? typeof(EventBean[]) : typeof(EventBean); var methodNode = codegenMethodScope.MakeChild(result, typeof(ExprEvalByGetterFragment), codegenClassScope); var refEPS = exprSymbol.GetAddEPS(methodNode); methodNode.Block .DeclareVar<EventBean>("@event", ArrayAtIndex(refEPS, Constant(StreamNum))) .IfRefNullReturnNull("@event") .MethodReturn( Cast(result, Getter.EventBeanFragmentCodegen(Ref("@event"), methodNode, codegenClassScope))); return LocalMethod(methodNode); }