Exemple #1
0
        public static CodegenExpression Codegen(
            DTLocalDtoOpsReformatForge forge,
            CodegenExpression inner,
            CodegenMethodScope codegenMethodScope,
            ExprForgeCodegenSymbol exprSymbol,
            CodegenClassScope codegenClassScope)
        {
            var methodNode = codegenMethodScope.MakeChild(
                    forge.reformatForge.ReturnType,
                    typeof(DTLocalDtoOpsReformatEval),
                    codegenClassScope)
                .AddParam(typeof(DateTimeOffset), "dto");

            var block = methodNode.Block;
            DTLocalUtil.EvaluateCalOpsDtoCodegen(
                block,
                "dto",
                forge.calendarForges,
                methodNode,
                exprSymbol,
                codegenClassScope);
            block.MethodReturn(
                forge.reformatForge.CodegenDateTimeOffset(Ref("dto"), methodNode, exprSymbol, codegenClassScope));
            return LocalMethod(methodNode, inner);
        }
Exemple #2
0
 public static CodegenExpression Codegen(
     DTLocalDtxOpsDtoForge forge,
     CodegenExpression inner,
     Type innerType,
     CodegenMethodScope codegenMethodScope,
     ExprForgeCodegenSymbol exprSymbol,
     CodegenClassScope codegenClassScope)
 {
     var methodNode = codegenMethodScope
         .MakeChild(typeof(DateTimeOffset), typeof(DTLocalDtxOpsDtoEval), codegenClassScope)
         .AddParam(typeof(DateTimeOffset), "target");
     var block = methodNode.Block;
     DTLocalUtil.EvaluateCalOpsDtoCodegen(
         block,
         "target",
         forge.calendarForges,
         methodNode,
         exprSymbol,
         codegenClassScope);
     block.MethodReturn(Ref("target"));
     return LocalMethod(methodNode, inner);
 }