Use ToGenericInstSig() ext method

This commit is contained in:
de4dot 2012-11-08 07:05:41 +01:00
parent c7f4bc83f1
commit ce6659510e
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ namespace de4dot.code {
var ts = typeRef as TypeSpec;
if (ts == null)
return typeRef;
var gis = ts.TypeSig.RemovePinnedAndModifiers() as GenericInstSig;
var gis = ts.ToGenericInstSig();
if (gis == null || gis.GenericType == null)
return typeRef;
return gis.GenericType.TypeDefOrRef;

View File

@ -237,7 +237,7 @@ namespace de4dot.code.renamer.asmmodules {
var ts = typeRef as TypeSpec;
if (ts == null)
return typeRef;
var gis = ts.TypeSig.RemovePinnedAndModifiers() as GenericInstSig;
var gis = ts.ToGenericInstSig();
if (gis == null || gis.GenericType == null)
return typeRef;
return gis.GenericType.TypeDefOrRef;