public CodegenExpression MakeCodegen(
            CodegenMethodScope parent,
            SAIFFInitializeSymbol symbols,
            CodegenClassScope classScope)
        {
            if (scheduleCallbackId == -1) {
                throw new IllegalStateException("Unassigned schedule callback id");
            }

            var method = parent.MakeChild(typeof(TimerWithinGuardFactory), GetType(), classScope);
            var patternDelta = PatternDeltaComputeUtil.MakePatternDeltaLambda(
                timeExpr,
                convertor,
                timeAbacus,
                method,
                classScope);

            method.Block
                .DeclareVar<TimerWithinGuardFactory>(
                    "factory",
                    ExprDotMethodChain(symbols.GetAddInitSvc(method))
                        .Get(EPStatementInitServicesConstants.PATTERNFACTORYSERVICE)
                        .Add("GuardTimerWithin"))
                .SetProperty(Ref("factory"), "ScheduleCallbackId", Constant(scheduleCallbackId))
                .SetProperty(Ref("factory"), "DeltaCompute", patternDelta)
                .MethodReturn(Ref("factory"));
            return LocalMethod(method);
        }
        public CodegenExpression MakeCodegen(
            CodegenMethodScope parent,
            SAIFFInitializeSymbol symbols,
            CodegenClassScope classScope)
        {
            if (scheduleCallbackId == -1) {
                throw new IllegalStateException("Unassigned schedule callback id");
            }

            var method = parent.MakeChild(typeof(TimerWithinOrMaxCountGuardFactory), GetType(), classScope);
            var patternDelta = PatternDeltaComputeUtil.MakePatternDeltaLambda(
                timeExpr,
                convertor,
                timeAbacus,
                method,
                classScope);

            CodegenExpression convertorExpr;
            if (numCountToExpr.Forge.ForgeConstantType.IsCompileTimeConstant) {
                convertorExpr = ConstantNull();
            }
            else {
                convertorExpr = ExprNodeUtilityCodegen.CodegenEvaluator(
                    numCountToExpr.Forge,
                    method,
                    GetType(),
                    classScope);
            }

            method.Block
                .DeclareVar<TimerWithinOrMaxCountGuardFactory>(
                    "factory",
                    ExprDotMethodChain(symbols.GetAddInitSvc(method))
                        .Get(EPStatementInitServicesConstants.PATTERNFACTORYSERVICE)
                        .Add("GuardTimerWithinOrMax"))
                .SetProperty(Ref("factory"), "ScheduleCallbackId", Constant(scheduleCallbackId))
                .SetProperty(Ref("factory"), "DeltaCompute", patternDelta)
                .SetProperty(Ref("factory"), "OptionalConvertor", convertorExpr)
                .SetProperty(
                    Ref("factory"),
                    "CountEval",
                    ExprNodeUtilityCodegen.CodegenEvaluator(numCountToExpr.Forge, method, GetType(), classScope))
                .MethodReturn(Ref("factory"));
            return LocalMethod(method);
        }