Browse Source

implement some signature decoder methods

pull/1198/head
Siegfried Pammer 7 years ago
parent
commit
18629d4677
  1. 2
      ICSharpCode.Decompiler/Metadata/Dom.cs
  2. 5
      ILSpy/Languages/Language.cs

2
ICSharpCode.Decompiler/Metadata/Dom.cs

@ -785,7 +785,7 @@ namespace ICSharpCode.Decompiler.Metadata @@ -785,7 +785,7 @@ namespace ICSharpCode.Decompiler.Metadata
public FullTypeName GetFunctionPointerType(MethodSignature<FullTypeName> signature)
{
throw new NotSupportedException();
return default(FullTypeName);
}
public FullTypeName GetGenericInstantiation(FullTypeName genericType, ImmutableArray<FullTypeName> typeArguments)

5
ILSpy/Languages/Language.cs

@ -304,7 +304,7 @@ namespace ICSharpCode.ILSpy @@ -304,7 +304,7 @@ namespace ICSharpCode.ILSpy
public string GetFunctionPointerType(SRM.MethodSignature<string> signature)
{
throw new NotImplementedException();
return "method " + signature.ReturnType + " *(" + string.Join(", ", signature.ParameterTypes) + ")";
}
public string GetGenericInstantiation(string genericType, ImmutableArray<string> typeArguments)
@ -324,7 +324,8 @@ namespace ICSharpCode.ILSpy @@ -324,7 +324,8 @@ namespace ICSharpCode.ILSpy
public string GetModifiedType(string modifier, string unmodifiedType, bool isRequired)
{
throw new NotImplementedException();
string modifierKeyword = isRequired ? "modreq" : "modopt";
return $"{unmodifiedType} {modifierKeyword}({modifier})";
}
public string GetPinnedType(string elementType)

Loading…
Cancel
Save