Пример #1
0
        public VulcanEngine.IR.IIR Execute(VulcanEngine.IR.IIR PredecessorIR)
        {
            // TODO: Enhance the PluginLoader so we can use it as the type store.  We're currently missing all types that lack a friendly name.
            XmlIR xmlIR = PredecessorIR as XmlIR;

            if (xmlIR == null)
            {
                // TODO: Message.Trace(Severity.Error, Resources.ErrorPhaseWorkflowIncorrectInputIRType, PredecessorIR.GetType().ToString(), this.Name);
            }

            AstIR astIR = new AstIR(xmlIR);

            astIR.AstRootNode = new AstRootNode();

            foreach (XmlIRDocumentType docType in astIR.XDocuments.Keys)
            {
                foreach (XDocument xDocument in astIR.XDocuments[docType])
                {
                    parseElement(xDocument.Root, astIR.AstRootNode, docType);
                }
            }

            HashSet <string> processedIncludeFiles = new HashSet <string>();
            List <string>    newIncludeFiles       = new List <string>();

            bool bContinue;

            do
            {
                bContinue = false;
                var newFiles = from file in astIR.AstRootNode.IncludedFiles
                               where !processedIncludeFiles.Contains(file.IncludedFile)
                               select file.IncludedFile;
                List <string> newFileList = new List <string>();
                newFileList.AddRange(newFiles);
                foreach (var xmlFile in newFileList)
                {
                    XDocument xDocument = astIR.AddXml(xmlFile, XmlIRDocumentType.INCLUDE);
                    if (xDocument != null)
                    {
                        bContinue = true;
                        parseElement(xDocument.Root, astIR.AstRootNode, XmlIRDocumentType.INCLUDE);
                        processedIncludeFiles.Add(xmlFile);
                    }
                }
            } while (bContinue);

            ProcessLateBindingQueue();

            ProcessNewObjectQueue(xmlIR);

            return(astIR);
        }
Пример #2
0
        public VulcanEngine.IR.IIR Execute(VulcanEngine.IR.IIR PredecessorIR)
        {
            XmlIR xmlIR = PredecessorIR as XmlIR;

            if (xmlIR == null)
            {
                Message.Trace(Severity.Error, Resources.ErrorPhaseWorkflowIncorrectInputIRType, PredecessorIR.GetType().ToString(), this.Name);
            }

            xmlIR.ValidateXDocuments();

            return(xmlIR);
        }
Пример #3
0
        public VulcanEngine.IR.IIR Execute(VulcanEngine.IR.IIR PredecessorIR)
        {
            AstIR ir = (AstIR)PredecessorIR;

            /*foreach (AstPackageNode p in ir.AstRootNode.Packages)
             * {
             *  foreach (AstTaskNode t in p)
             *  {
             *      Console.WriteLine("Task! {0}", t.Name);
             *  }
             * } */
            return(ProcessTableQuerySources(ir));
            //return ir;
        }