static CrefBuilder Cref(CrefBuilder b, string ns, CodeTypeDeclaration type)
{
b.Cref.Append (ns).Append (".").Append (type.Name);
if (type.TypeParameters.Count > 0) {
b.Cref.Append ("{").Append (type.TypeParameters [0].Name);
for (int i = 1; i < type.TypeParameters.Count; ++i)
b.Cref.Append (",").Append (type.TypeParameters [i].Name);
b.Cref.Append ("}");
}
return b;
}