Model: Introduce TypeInfo.GetGenericArguments(), refactor handling

This commit is contained in:
Katy Coe
2020-01-29 10:14:41 +01:00
parent 871c368e49
commit a338196057
2 changed files with 39 additions and 48 deletions

View File

@@ -555,12 +555,11 @@ namespace Il2CppInspector
sb.Append($" // TypeDefIndex: {type.Index}");
sb.Append("\n");
if (type.GenericTypeParameters != null)
foreach (var gp in type.GenericTypeParameters) {
var constraint = gp.GetTypeConstraintsString(scope);
if (constraint != string.Empty)
sb.Append($"{prefix}\t{constraint}\n");
}
foreach (var gp in type.GetGenericArguments()) {
var constraint = gp.GetTypeConstraintsString(scope);
if (constraint != string.Empty)
sb.Append($"{prefix}\t{constraint}\n");
}
sb.Append(prefix + "{\n");