Browse Source

Don't show fully qualified names

pull/10/head
David Srbecký 15 years ago
parent
commit
19a5b6c151
  1. 20
      ICSharpCode.Decompiler/Ast/AstBuilder.cs

20
ICSharpCode.Decompiler/Ast/AstBuilder.cs

@ -247,14 +247,18 @@ namespace Decompiler
} }
name = ICSharpCode.NRefactory.TypeSystem.ReflectionHelper.SplitTypeParameterCountFromReflectionName(name); name = ICSharpCode.NRefactory.TypeSystem.ReflectionHelper.SplitTypeParameterCountFromReflectionName(name);
if (ns.Length == 0)
return new SimpleType(name); // TODO: Until we can simplify type with 'using', use just the name without namesapce
string[] parts = ns.Split('.'); return new SimpleType(name).WithAnnotation(type);
AstType nsType = new SimpleType(parts[0]);
for (int i = 1; i < parts.Length; i++) { // if (ns.Length == 0)
nsType = new MemberType { Target = nsType, MemberName = parts[i] }; // return new SimpleType(name).WithAnnotation(type);
} // string[] parts = ns.Split('.');
return new MemberType { Target = nsType, MemberName = name }.WithAnnotation(type); // AstType nsType = new SimpleType(parts[0]);
// for (int i = 1; i < parts.Length; i++) {
// nsType = new MemberType { Target = nsType, MemberName = parts[i] };
// }
// return new MemberType { Target = nsType, MemberName = name }.WithAnnotation(type);
} }
} }
} }

Loading…
Cancel
Save