[Mono-docs-list] Differences between generic names in the documentation.

Valentin Sawadski valentin.sawadski at gmx.de
Sat Dec 8 06:04:34 EST 2007


I recently tried to work on the generics support in monodocer and
noticed that it has names one and the same type differently.

Eg: If i have a "public class Test<T>" monodocer will produce the
following output.

	  <Namespace Name="Test">
	    <Type Name="Test`1" />

Test`1.xml (Note that the the filename and name of the type are already
	<Type Name="Test&lt;T&gt;" FullName="Test.Test.Test&lt;T&gt;">

But then again it seems that the browser uses the Test&lt;T&gt;
everywhere. Sometimes it gets parsed and will be displayed as Test<T>
but other times not and some ugly HTML-Entities are being shown as the
class name.

To streamline all these naming issues my proposal is to use the Test`1
Notation everywhere to be more coherent with the output of Type.Name and
not to introduce too much C#-Notations into the docs since Mono can be
used from a couple of languages.

Generic Methods are also stored in the fancy "Method&lt;T&gt" way while
the Name returned by the corresponding MethodInfo would just be
"Method". Here I would also alter the Name to be compliant with the
output of MethodInfo, otherwise different generic overloads won't be
recognized as an overload (See Console.Write for example)

The changes in monodocer should be pretty easy to do (probably less 20
lines of code). However I haven't yet tested how the rest of the
documentation stack will react. Any comments on that?

Kind Regards,

More information about the Mono-docs-list mailing list