CreateOutput() public méthode

public CreateOutput ( ) : string
Résultat string
Exemple #1
0
        public void Generate()
        {
            var parser = new NantBuildFileParser();
            var mainDocument = XDocument.Load(_pathToNantFile);
            var rootDir = Path.GetDirectoryName(_pathToNantFile);

            foreach(var includes in mainDocument.Root.Elements("include"))
            {
                var xdocToInclude = XDocument.Load(rootDir + "\\" + includes.Attribute("buildfile").Value);
                foreach (var includeElement in xdocToInclude.Root.Elements())
                {
                    mainDocument.Root.AddFirst(includeElement);
                }
            }

            BuildProject buildProject = parser.ParseDocument(mainDocument);
            var outputGenerator = new OutputGenerator(buildProject);
            string output = outputGenerator.CreateOutput();
            using (var fs = new StreamWriter(_pathToOutputFile + "\\default.cs"))
            {
                fs.Write(output);
            }
        }
Exemple #2
0
        public void Generate()
        {
            var parser       = new NantBuildFileParser();
            var mainDocument = XDocument.Load(_pathToNantFile);
            var rootDir      = Path.GetDirectoryName(_pathToNantFile);

            foreach (var includes in mainDocument.Root.Elements("include"))
            {
                var xdocToInclude = XDocument.Load(rootDir + "\\" + includes.Attribute("buildfile").Value);
                foreach (var includeElement in xdocToInclude.Root.Elements())
                {
                    mainDocument.Root.AddFirst(includeElement);
                }
            }

            BuildProject buildProject    = parser.ParseDocument(mainDocument);
            var          outputGenerator = new OutputGenerator(buildProject);
            string       output          = outputGenerator.CreateOutput();

            using (var fs = new StreamWriter(_pathToOutputFile + "\\default.cs"))
            {
                fs.Write(output);
            }
        }