コード例 #1
0
 private CodegenMethod IsExistsPropertyCodegen(
     CodegenMethodScope codegenMethodScope,
     CodegenClassScope codegenClassScope)
 {
     return codegenMethodScope.MakeChild(typeof(bool), GetType(), codegenClassScope)
         .AddParam(typeof(object[]), "array")
         .Block
         .DeclareVar<object>("value", ArrayAtIndex(Ref("array"), Constant(propertyIndex)))
         .IfRefNullReturnFalse("value")
         .IfInstanceOf("value", typeof(EventBean))
         .BlockReturn(
             entryGetter.EventBeanExistsCodegen(
                 CastRef(typeof(EventBean), "value"),
                 codegenMethodScope,
                 codegenClassScope))
         .MethodReturn(
             entryGetter.UnderlyingExistsCodegen(
                 FlexCast(entryGetter.TargetType, Ref("value")),
                 codegenMethodScope,
                 codegenClassScope));
 }