leastfixedpoint

NDocProc updated for C# 2.0 with Generics

This page is a mirrored copy of an article originally posted on the (now sadly defunct) LShift blog; see the archive index here.

Wed, 7 November 2007

NDocProc, our small and simple .NET javadoc-like documentation generator, has been updated for C# 2.0 and Generics.

Changes since the previous announcement include:

The project homepage is here. You can download a zip of the latest version, or use mercurial git to check out the repository:

git clone https://github.com/tonyg/ndocproc

Comments

On 14 January, 2008 at 3:05 am, Claus wrote:

Change this code in “Reflection”:
foreach (Type t in a.GetTypes())
{
if (t.Namespace == null)
continue;
if (!namespaces.ContainsKey(t.Namespace))
{
namespaces[t.Namespace] = new ArrayList();
}
((ArrayList)namespaces[t.Namespace]).Add(t);
types[t.FullName] = t;
}

On 14 January, 2008 at 12:36 pm, tonyg wrote:

Hi Claus,

Thanks for the contribution! What’s the motivation behind the change?

On 18 January, 2008 at 2:46 am, Claus wrote:

In my project, the key ‘t.Namespace’ was noy in the list. So I got an exception at ‘namespaces[t.Namespace]=….

BTW: I always do this checking with Arrays.

On 21 January, 2008 at 12:32 pm, tonyg wrote:

So, it turns out that in yet another design masterstroke, MS have decreed that null shall not be permitted as a key in an IDictionary. Thanks for the heads-up, Claus. I shall work around the issue and release another snapshot.

On 21 January, 2008 at 1:12 pm, tonyg wrote:

I’ve released an update to NDocProc which fixes the bug, Claus. Please let me know if it works for you! … and thanks for the bug report.