Browse Source

Fix detection of mcs generated anonymous type

pull/307/head
Jb Evain 14 years ago
parent
commit
776381343b
  1. 2
      ICSharpCode.Decompiler/CecilExtensions.cs

2
ICSharpCode.Decompiler/CecilExtensions.cs

@ -220,7 +220,7 @@ namespace ICSharpCode.Decompiler @@ -220,7 +220,7 @@ namespace ICSharpCode.Decompiler
{
if (type == null)
return false;
if (string.IsNullOrEmpty(type.Namespace) && type.HasGeneratedName() && type.Name.Contains("Anon")) {
if (string.IsNullOrEmpty(type.Namespace) && type.HasGeneratedName() && (type.Name.Contains("AnonType") || type.Name.Contains("AnonymousType"))) {
TypeDefinition td = type.Resolve();
return td != null && td.IsCompilerGenerated();
}

Loading…
Cancel
Save