Due to EmptyArray<t> that doesn't have a namespace (null), i changed Register in genericutil do support this.</t>
internal static void Register(Type t) {
Dictionary<string, List<string>> nsmap = null;
// dgsantana: Correct bug for EmptyArray that doesn't have a namespace defined... ????
var _namespace = string.IsNullOrWhiteSpace(t.Namespace) ? "" : t.Namespace;
mapping.TryGetValue(_namespace, out nsmap);
if (nsmap == null) {
nsmap = new Dictionary<string, List<string>>();
mapping[_namespace] = nsmap;
}
string basename = t.Name;
int tick = basename.IndexOf("`");
if (tick > -1) {
basename = basename.Substring(0, tick);
}
List<string> gnames = null;
nsmap.TryGetValue(basename, out gnames);
if (gnames == null) {
gnames = new List<string>();
nsmap[basename] = gnames;
}
gnames.Add(t.Name);
}
I had the same problem with a type with no namespace. Here are the genericutil changes that solved it.
Last edit: Clayton Stangeland 2014-07-11