Exemplo n.º 1
0
        // Pull out a list of names of projects that are imported by this project
        public List <string> FindImportedProjectsThatNeedExporting()
        {
            var imports = doc.Descendants(NS + "Import");

            List <string> importPaths = new List <string>();

            foreach (var import in imports)
            {
                var importPath = import.Attribute("Project").Value;

                importPath = Expand(importPath);

                // After we've expanded variables we know about, anything that still starts with a $ we leave unmodified
                if (!importPath.StartsWith("$"))
                {
                    // Everything else we convert into a full path
                    importPath = Path.GetFullPath(Path.Combine(SourceDirectory, importPath));
                }

                if (config.ShouldExport(importPath))
                {
                    importPaths.Add(importPath);
                }
            }

            return(importPaths);
        }