[Mono-list] Autogenerating accurate documentation
John Barnette
jbarn@httcb.net
Fri, 28 Dec 2001 13:05:34 -0700
Kids,
I'm hacking away on some tools to autogenerate stub XML documentation files
from an assembly, using an XML format quite similar to the ECMA docs. Among
other things, this XML contains signature examples, e.g.
<type name="ArrayList" fullName="System.Collections.ArrayList">
<signature lang="ILASM" value="FIXME" />
<signature lang="C#" value="FIXME" />
<!-- ... -->
</type>
While there are signatures specified in the ECMA XML, I'd prefer to generate
'em from the Type object for accuracy.
Has anybody written code that does something similar to the following?
// begin pathetic example snippet
Type t = Type.GetType("System.Collections.ArrayList", false);
string ilSig = SignatureGenerator.GetIlasmSigForType(t);
string csSig = SignatureGenerator.GetCsharpSigForType(t);
Console.WriteLine("ILASM: {0}", ilSig);
Console.WriteLine("C#: {0}", csSig);
// CONSOLE (lines broken for readability):
// ILASM: .class public serializable ArrayList extends System.Object
// implements System.ICloneable, System.Collections.ICollection,
// System.Collections.IEnumerable, System.Collections.IList
// C#: public class ArrayList :
// ICloneable, ICollection, IEnumerable, IList
// end pathetic example snippet
I'm perfectly happy to write this functionality myself, but I figured I'd
check with the monkeys first.
~ j. // Oh, and Happy Holidays to all.