Browse Source

fix display of type names in tree view

pull/254/head
Siegfried Pammer 14 years ago
parent
commit
4338b361c4
  1. 15
      ILSpy/VB/VBLanguage.cs

15
ILSpy/VB/VBLanguage.cs

@ -447,15 +447,28 @@ namespace ICSharpCode.ILSpy.VB @@ -447,15 +447,28 @@ namespace ICSharpCode.ILSpy.VB
});
}
public override string FormatTypeName(TypeDefinition type)
{
if (type == null)
throw new ArgumentNullException("type");
return TypeToString(ConvertTypeOptions.DoNotUsePrimitiveTypeNames | ConvertTypeOptions.IncludeTypeParameterDefinitions, type);
}
public override string TypeToString(TypeReference type, bool includeNamespace, ICustomAttributeProvider typeAttributes = null)
{
ConvertTypeOptions options = ConvertTypeOptions.IncludeTypeParameterDefinitions;
if (includeNamespace)
options |= ConvertTypeOptions.IncludeNamespace;
return TypeToString(options, type, typeAttributes);
}
string TypeToString(ConvertTypeOptions options, TypeReference type, ICustomAttributeProvider typeAttributes = null)
{
var astType = AstBuilder
.ConvertType(type, typeAttributes, options)
.AcceptVisitor(new CSharpToVBConverterVisitor(new ILSpyEnvironmentProvider()), null);
StringWriter w = new StringWriter();
// TODO
// if (type.IsByReference) {

Loading…
Cancel
Save