예제 #1
0
        public void DocumentType(Type t)
        {
            string      path = owner.MakeDocumentPath(t);
            XmlDocument doc  = owner.LoadXmlDocument(path, ElementName);

            doc.DocumentElement.SetAttribute("name", GetTypeName(t));
            XmlSynchronizer.AssertDocsElement(doc.DocumentElement);
            DocumentDetails(t, doc.DocumentElement);

            owner.WriteXmlDocument(path, doc);
        }
예제 #2
0
        protected override void DocumentDetails(Type t, XmlElement top)
        {
            Mono.Build.RuleLib.RegexMatcher rm = (Mono.Build.RuleLib.RegexMatcher)Activator.CreateInstance(t);

            XmlElement c = XmlSynchronizer.AssertChildElement(top, "regex");

            c.InnerText = rm.GetRegex();

            c           = XmlSynchronizer.AssertChildElement(top, "rule");
            c.InnerText = rm.GetRuleType().ToString();
        }
예제 #3
0
        void DocumentAssembly()
        {
            string      path = String.Format("bundle{0}bundle.xml", Path.DirectorySeparatorChar);
            XmlDocument doc  = LoadXmlDocument(path, "bundle");

            string name = assy.GetName().Name;

            if (name.StartsWith(MBuildPrefix))
            {
                name = name.Substring(MBuildPrefix.Length);
            }

            doc.DocumentElement.SetAttribute("name", name);
            XmlSynchronizer.AssertDocsElement(doc.DocumentElement);

            NamespaceSynchronizer nss = new NamespaceSynchronizer(namespaces.Keys, assy_vers,
                                                                  doc.DocumentElement);

            nss.Synchronize();

            WriteXmlDocument(path, doc);
        }