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); }
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(); }
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); }