Author: jonpryor
Date: 2007-12-12 20:16:19 -0500 (Wed, 12 Dec 2007)
New Revision: 91192
Modified:
trunk/monodoc/tools/ChangeLog
trunk/monodoc/tools/monodocer.cs
Log:
* monodocer.cs: Sort the <AssemblyVersion/> entries so that when
rendering
them within monodoc we show versions in increasing order.
Modified: trunk/monodoc/tools/ChangeLog
===================================================================
--- trunk/monodoc/tools/ChangeLog 2007-12-13 01:02:09 UTC (rev 91191)
+++ trunk/monodoc/tools/ChangeLog 2007-12-13 01:16:19 UTC (rev 91192)
@@ -1,3 +1,8 @@
+2007-12-12 Jonathan Pryor <[EMAIL PROTECTED]>
+
+ * monodocer.cs: Sort the <AssemblyVersion/> entries so that when
rendering
+ them within monodoc we show versions in increasing order.
+
2007-12-11 Jonathan Pryor <[EMAIL PROTECTED]>
* monodocer.cs: Don't use File.OpenWrite(), as that doesn't truncate the
Modified: trunk/monodoc/tools/monodocer.cs
===================================================================
--- trunk/monodoc/tools/monodocer.cs 2007-12-13 01:02:09 UTC (rev 91191)
+++ trunk/monodoc/tools/monodocer.cs 2007-12-13 01:16:19 UTC (rev 91192)
@@ -669,6 +669,13 @@
return x.Attributes ["Name"].Value.CompareTo
(y.Attributes ["Name"].Value);
}
}
+
+ class VersionComparer : XmlNodeComparer {
+ public override int Compare (XmlNode x, XmlNode y)
+ {
+ return new Version (x.InnerText).CompareTo (new Version
(y.InnerText));
+ }
+ }
private static bool IsPublic (Type type)
{
@@ -1806,6 +1813,8 @@
}
}
// matches.Count == 0 && !add: ignore -- already not present
+
+ SortXmlNodes (root, root.SelectNodes ("AssemblyVersion"), new
VersionComparer ());
return e.ChildNodes.Count != 0;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches