private DBInfo.Core.Statement.CreateFunction ParseCreateFunctionStatement(CreateFunction xmlFunction)
        {
            DBInfo.Core.Model.Function f = new DBInfo.Core.Model.Function();
            f.Body = xmlFunction.SourceCode;
            f.Name = xmlFunction.Name;

            DBInfo.Core.Statement.CreateFunction cf = new DBInfo.Core.Statement.CreateFunction();
            cf.Function = f;

            return(cf);
        }
Esempio n. 2
0
        private void GenerateFunctions(List <DBInfo.Core.Statement.CreateFunction> functionList)
        {
            if (!Directory.Exists(OutputDir + "\\" + FunctionsDir))
            {
                Directory.CreateDirectory(OutputDir + "\\" + FunctionsDir);
            }

            foreach (DBInfo.Core.Statement.CreateFunction f in functionList)
            {
                CreateFunction xmlFunction = new CreateFunction();
                xmlFunction.Name       = f.Function.Name;
                xmlFunction.SourceCode = f.Function.Body;

                StatementCollection stCol = new StatementCollection();
                stCol.Statement    = new Statement[1];
                stCol.Statement[0] = xmlFunction;
                generateXMLOutput(stCol, OutputDir + "\\" + FunctionsDir + "\\" + f.Function.Name + ".function.xml", true);
            }
        }