Esempio n. 1
0
        private OoFunction ToOoFunction(FunctionEntity func)
        {
            var className = GetClassName("Function", func.Order);
            var funcName  = _analyzer.FindFunctionName(func.Code) ??
                            throw new DomainException($"Cannot find method name for function {func}");

            return(new OoFunction(ToStaticClass(func.Code, className), func.Order, funcName, className, func.Id));
        }
        private ImperativeFunction ToImperativeFunction(FunctionEntity function)
        {
            var funcName = _analyzer.FindFunctionName(function.Code) ??
                           throw new DomainException($"Cannot find function name for function {function.Id}");
            var newFuncName = GetFunctionName(TestPrefix, function.Order);
            var funcCode    = function.Code.ReplaceFirst(funcName, newFuncName);

            return(new ImperativeFunction(funcCode, function.Order, newFuncName, function.Id));
        }