Ejemplo n.º 1
0
        public void Save(string file, IWorkbenchProject project)
        {
            XmlDocument doc      = new XmlDocument();
            XmlNode     rootNode = doc.CreateElement("appconfig");

            doc.AppendChild(rootNode);

            XmlNode node = doc.CreateElement("projectpath");

            node.InnerText = RelativePaths.GetRelativePath(Path.GetDirectoryName(project.ProjectFile), OutputPath);
            rootNode.AppendChild(node);

            node = doc.CreateElement("templatefilename");

            node.InnerText = project.GetPathRelativeToProjectFile(TemplateFileName);
            rootNode.AppendChild(node);

            node           = doc.CreateElement("guid");
            node.InnerText = ProjectGuid.ToString("B");
            rootNode.AppendChild(node);

            node           = doc.CreateElement("user-template-name");
            node.InnerText = UserTemplateName;
            rootNode.AppendChild(node);

            doc.Save(file);
        }