public CodegenExpression EvaluateCodegen( Type requiredType, CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) { if (_firstRowOnly) { CodegenMethod firstMethodNode = codegenMethodScope .MakeChild(typeof(EventBean), typeof(ExprEvalEnumerationCollForge), codegenClassScope); firstMethodNode.Block .DeclareVar<FlexCollection>( "events", _enumerationForge.EvaluateGetROCollectionEventsCodegen( firstMethodNode, exprSymbol, codegenClassScope)) .IfRefNullReturnNull("events") .IfCondition(EqualsIdentity(ExprDotName(Ref("events"), "Count"), Constant(0))) .BlockReturn(ConstantNull()) .MethodReturn(StaticMethod(typeof(EventBeanUtility), "GetNonemptyFirstEvent", Ref("events"))); return LocalMethod(firstMethodNode); } CodegenMethod methodNode = codegenMethodScope.MakeChild( typeof(EventBean[]), typeof(ExprEvalEnumerationCollForge), codegenClassScope); methodNode.Block .DeclareVar<FlexCollection>( "events", FlexWrap(_enumerationForge.EvaluateGetROCollectionEventsCodegen(methodNode, exprSymbol, codegenClassScope))) .IfRefNullReturnNull("events") .MethodReturn(ExprDotMethod(ExprDotName(Ref("events"), "EventBeanCollection"), "ToArray")); return LocalMethod(methodNode); }
public CodegenExpression EvaluateCodegen( Type requiredType, CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) { return _enumeration.EvaluateGetROCollectionEventsCodegen(codegenMethodScope, exprSymbol, codegenClassScope); }
public CodegenExpression EvaluateCodegen( Type requiredType, CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) { CodegenMethod methodNode = codegenMethodScope.MakeChild( typeof(EventBean[]), this.GetType(), codegenClassScope); methodNode.Block .DeclareVar<FlexCollection>( "result", FlexWrap(enumerationForge.EvaluateGetROCollectionEventsCodegen(methodNode, exprSymbol, codegenClassScope))) .IfRefNullReturnNull(Ref("result")) .MethodReturn(ExprDotMethod(ExprDotName(Ref("result"), "EventBeanCollection"), "ToArray")); return LocalMethod(methodNode); }