Author: jonpryor
Date: 2008-01-02 22:39:07 -0500 (Wed, 02 Jan 2008)
New Revision: 92150
Modified:
trunk/monodoc/tools/ChangeLog
trunk/monodoc/tools/monodocer.cs
Log:
* monodocer.cs: Don't generate files that contain characters that are
invalid on Win32 platforms. These are frequently compiler-generated
types, e.g. '<>c__CompilerGenerated2+<>c__CompilerGenerated13', but
are
occasionally public when they shouldn't be. Fix the
UpdateAssemblyVersions() logic to return true IFF there are > 0
<AssemblyVersion/> elements.
Modified: trunk/monodoc/tools/ChangeLog
===================================================================
--- trunk/monodoc/tools/ChangeLog 2008-01-03 03:25:55 UTC (rev 92149)
+++ trunk/monodoc/tools/ChangeLog 2008-01-03 03:39:07 UTC (rev 92150)
@@ -1,5 +1,14 @@
2008-01-02 Jonathan Pryor <[EMAIL PROTECTED]>
+ * monodocer.cs: Don't generate files that contain characters that are
+ invalid on Win32 platforms. These are frequently compiler-generated
+ types, e.g. '<>c__CompilerGenerated2+<>c__CompilerGenerated13', but
are
+ occasionally public when they shouldn't be. Fix the
+ UpdateAssemblyVersions() logic to return true IFF there are > 0
+ <AssemblyVersion/> elements.
+
+2008-01-02 Jonathan Pryor <[EMAIL PROTECTED]>
+
* DocTest-v1.cs: Add a type to the root namespace.
* monodocer.cs: Permit types to exist in the root namespace. This is
needed
to properly document ../class/Npgsql, though I have no idea how
`monodoc'
Modified: trunk/monodoc/tools/monodocer.cs
===================================================================
--- trunk/monodoc/tools/monodocer.cs 2008-01-03 03:25:55 UTC (rev 92149)
+++ trunk/monodoc/tools/monodocer.cs 2008-01-03 03:39:07 UTC (rev 92150)
@@ -538,11 +538,13 @@
WriteXml(index.DocumentElement, writer);
}
+ private static char[] InvalidFilenameChars = {'\\', '/', ':', '*', '?',
'"', '<', '>', '|'};
+
private static void DoUpdateAssembly (Assembly assembly, XmlElement
index_types, string source, string dest, Hashtable goodfiles)
{
foreach (DocsTypeInfo docTypeInfo in GetTypes (assembly, null))
{
Type type = docTypeInfo.Type;
- if (!IsPublic (type))
+ if (!IsPublic (type) || type.FullName.IndexOfAny
(InvalidFilenameChars) >= 0)
continue;
string reltypepath = DoUpdateType (type, source, dest,
docTypeInfo.EcmaDocs);
@@ -755,8 +757,9 @@
// Look for type nodes that no longer correspond to types
foreach (XmlElement typenode in
index_types.SelectNodes("Namespace/Type")) {
string fulltypename = Path.Combine
(((XmlElement)typenode.ParentNode).GetAttribute("Name"),
typenode.GetAttribute("Name") + ".xml");
- if (!goodfiles.ContainsKey(fulltypename))
+ if (!goodfiles.ContainsKey(fulltypename)) {
typenode.ParentNode.RemoveChild(typenode);
+ }
}
}
@@ -1401,14 +1404,14 @@
#endif
}
-#if NET_1_0
- static IEnumerable Sort (ICollection list)
+ static IEnumerable Sort (IEnumerable list)
{
- ArrayList l = new ArrayList (list);
+ ArrayList l = new ArrayList (list as ICollection);
l.Sort ();
return l;
}
-#else
+
+#if !NET_1_0
static IEnumerable<T> Sort<T> (IEnumerable<T> list)
{
List<T> l = new List<T> (list);
@@ -1837,8 +1840,10 @@
}
// matches.Count == 0 && !add: ignore -- already not present
- SortXmlNodes (e, e.SelectNodes ("AssemblyVersion"), new
VersionComparer ());
- return e.ChildNodes.Count != 0;
+ XmlNodeList avs = e.SelectNodes ("AssemblyVersion");
+ SortXmlNodes (e, avs, new VersionComparer ());
+
+ return avs.Count != 0;
}
private static void MakeAttributes(XmlElement root, object attributes,
bool assemblyAttributes) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches