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")));
 }
Esempio n. 2
0
 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")));
 }
Esempio n. 4
0
 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"))));
 }