protected virtual void LoadRootFiles(ProjectElement project, XmlDocument lDoc, string lProjectDir, string lProjectLangTag) { string query = "VisualStudioProject/Files/File"; XmlNodeList files = lDoc.SelectNodes(query); int count = files.Count; for (int i = 0; i < count; i++) { System.Xml.XmlNode fileNode = files[i]; System.Xml.XmlNode relPath = fileNode.Attributes.GetNamedItem("RelativePath"); string lFilePath = Path.Combine(lProjectDir, relPath.Value); project.AddDiskFile(lFilePath); } }
private void LoadBuildItems(ProjectElement project, string projectDir, IEnumerable <BuildItem> items) { if (project == null || string.IsNullOrEmpty(projectDir) || items == null) { return; } foreach (BuildItem item in items) { string spec = item.FinalItemSpec; string filePath = Path.Combine(projectDir, spec); SourceFile proxy = project.AddDiskFile(filePath); proxy.BuildProjectSymbols(); } }
protected virtual void LoadFiles(ProjectElement project, XmlDocument lDoc, string lProjectDir, string lProjectLangTag) { string lFilesQuery = GetFilesQuery(lProjectLangTag); XmlNodeList lFiles = lDoc.SelectNodes(lFilesQuery); int lCount = lFiles.Count; for (int i = 0; i < lCount; i++) { System.Xml.XmlNode lFileNode = lFiles[i]; System.Xml.XmlNode lRelPath = lFileNode.Attributes.GetNamedItem(STR_RelPath); string lFilePath = Path.Combine(lProjectDir, lRelPath.Value); SourceFile proxy = project.AddDiskFile(lFilePath); proxy.BuildProjectSymbols(); } }
private void LoadFilesFromPath(ProjectElement project, string path) { string[] files = Directory.GetFiles(path); foreach (string filePath in files) { SourceFile proxy = project.AddDiskFile(filePath); proxy.BuildProjectSymbols(); } string[] directories = Directory.GetDirectories(path); foreach (string directory in directories) { LoadFilesFromPath(project, directory); } }
private void LoadBuildItems(ProjectElement project, string projectDir, IEnumerable<BuildItem> items) { if (project == null || string.IsNullOrEmpty(projectDir) || items == null) { return; } foreach (BuildItem item in items) { string spec = item.FinalItemSpec; string filePath = Path.Combine(projectDir, spec); SourceFile proxy = project.AddDiskFile(filePath); proxy.BuildProjectSymbols(); } }