예제 #1
0
 private string IsExistsPropertyCodegen(ICodegenContext context)
 {
     return context.AddMethod(typeof(bool), typeof(object[]), "array", GetType())
         .DeclareVar(typeof(object), "value",
             ArrayAtIndex(Ref("array"),
                 Constant(_propertyIndex)))
         .IfRefNullReturnFalse("value")
         .IfInstanceOf("value", typeof(EventBean))
         .BlockReturn(_entryGetter.CodegenEventBeanExists(CastRef(typeof(EventBean), "value"),
             context))
         .MethodReturn(_entryGetter.CodegenUnderlyingExists(
             Cast(_entryGetter.TargetType, Ref("value")), context));
 }