private string GetFragmentCodegen(ICodegenContext context) { return context.AddMethod(typeof(object), typeof(Map), "map", GetType()) .DeclareVar(typeof(EventBean[]), "wrapper", Cast(typeof(EventBean[]), ExprDotMethod(Ref("map"), "get", Constant(_propertyName)))) .MethodReturn(LocalMethod( BaseNestableEventUtil.GetArrayPropertyFragmentCodegen(context, _index, _nestedGetter), Ref("wrapper"))); }
private CodegenMethod GetFragmentCodegen( CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) { return codegenMethodScope.MakeChild(typeof(object), GetType(), codegenClassScope) .AddParam(typeof(object[]), "array") .Block .DeclareVar<EventBean[]>( "wrapper", Cast(typeof(EventBean[]), ArrayAtIndex(Ref("array"), Constant(propertyIndex)))) .MethodReturn( LocalMethod( BaseNestableEventUtil.GetArrayPropertyFragmentCodegen( codegenMethodScope, codegenClassScope, index, nestedGetter), Ref("wrapper"))); }
private CodegenMethod GetFragmentCodegen( CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) { return codegenMethodScope.MakeChild(typeof(object), GetType(), codegenClassScope) .AddParam(typeof(IDictionary<string, object>), "map") .Block .DeclareVar<EventBean[]>( "wrapper", Cast(typeof(EventBean[]), ExprDotMethod(Ref("map"), "Get", Constant(propertyName)))) .MethodReturn( LocalMethod( BaseNestableEventUtil.GetArrayPropertyFragmentCodegen( codegenMethodScope, codegenClassScope, index, nestedGetter), Ref("wrapper"))); }
private String GetFragmentCodegen(ICodegenContext context) { return(context.AddMethod(typeof(Object), typeof(Object[]), "array", GetType()) .DeclareVar(typeof(EventBean[]), "wrapper", Cast(typeof(EventBean[]), ArrayAtIndex(Ref("array"), Constant(_propertyIndex)))) .MethodReturn(LocalMethod(BaseNestableEventUtil.GetArrayPropertyFragmentCodegen(context, _index, _nestedGetter), Ref("wrapper")))); }