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); }
public static CodegenExpression Codegen( DTLocalLongOpsReformatForge forge, CodegenExpression inner, CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) { CodegenExpression timeZoneField = codegenClassScope.AddOrGetDefaultFieldSharable(RuntimeSettingsTimeZoneField.INSTANCE); var methodNode = codegenMethodScope.MakeChild( forge.reformatForge.ReturnType, typeof(DTLocalLongOpsReformatEval), codegenClassScope) .AddParam(typeof(long), "target"); var block = methodNode.Block .DeclareVar<DateTimeEx>("dtx", StaticMethod(typeof(DateTimeEx), "GetInstance", timeZoneField)) .Expression( forge.timeAbacus.DateTimeSetCodegen(Ref("target"), Ref("dtx"), methodNode, codegenClassScope)); DTLocalUtil.EvaluateCalOpsDtxCodegen( block, forge.calendarForges, Ref("dtx"), methodNode, exprSymbol, codegenClassScope); block.MethodReturn( forge.reformatForge.CodegenDateTimeEx(Ref("dtx"), methodNode, exprSymbol, codegenClassScope)); return LocalMethod(methodNode, inner); }
public static CodegenExpression Codegen( DTLocalDtxOpsReformatForge forge, CodegenExpression inner, CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) { var methodNode = codegenMethodScope.MakeChild( forge.reformatForge.ReturnType, typeof(DTLocalDtxOpsReformatEval), codegenClassScope) .AddParam(typeof(DateTimeEx), "target"); var block = methodNode.Block .DeclareVar<DateTimeEx>( "dtx", Cast(typeof(DateTimeEx), ExprDotMethod(Ref("target"), "Clone"))); DTLocalUtil.EvaluateCalOpsDtxCodegen( block, forge.calendarForges, Ref("dtx"), methodNode, exprSymbol, codegenClassScope); block.MethodReturn( forge.reformatForge.CodegenDateTimeEx(Ref("dtx"), methodNode, exprSymbol, codegenClassScope)); return LocalMethod(methodNode, inner); }
public object Evaluate( object target, EventBean[] eventsPerStream, bool isNewData, ExprEvaluatorContext exprEvaluatorContext) { DateTimeOffset dto = (DateTimeOffset) target; return DTLocalUtil.EvaluateCalOpsDto(calendarOps, dto, eventsPerStream, isNewData, exprEvaluatorContext); }
public override object Evaluate( object target, EventBean[] eventsPerStream, bool isNewData, ExprEvaluatorContext exprEvaluatorContext) { var dto = (DateTimeOffset) target; dto = DTLocalUtil.EvaluateCalOpsDto(calendarOps, dto, eventsPerStream, isNewData, exprEvaluatorContext); return reformatOp.Evaluate(dto, eventsPerStream, isNewData, exprEvaluatorContext); }
public override object Evaluate( object target, EventBean[] eventsPerStream, bool isNewData, ExprEvaluatorContext exprEvaluatorContext) { var dtx = ((DateTimeEx) target).Clone(); DTLocalUtil.EvaluateCalOpsDtx(calendarOps, dtx, eventsPerStream, isNewData, exprEvaluatorContext); return reformatOp.Evaluate(dtx, eventsPerStream, isNewData, exprEvaluatorContext); }
public override object Evaluate( object target, EventBean[] eventsPerStream, bool isNewData, ExprEvaluatorContext exprEvaluatorContext) { var dtx = DateTimeEx.GetInstance(timeZone); timeAbacus.DateTimeSet(target.AsInt64(), dtx); DTLocalUtil.EvaluateCalOpsDtx(calendarOps, dtx, eventsPerStream, isNewData, exprEvaluatorContext); return reformatOp.Evaluate(dtx, eventsPerStream, isNewData, exprEvaluatorContext); }
public object Evaluate( object target, EventBean[] eventsPerStream, bool isNewData, ExprEvaluatorContext exprEvaluatorContext) { var dtxValue = (DateTimeEx) target; var dtx = dtxValue.Clone(); DTLocalUtil.EvaluateCalOpsDtx(calendarOps, dtx, eventsPerStream, isNewData, exprEvaluatorContext); return dtx; }
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); }