Remove call to obsolete methods

This commit is contained in:
Sinai
2022-04-24 01:59:40 +10:00
parent b5e3cc2ea5
commit 81a174f865
2 changed files with 7 additions and 9 deletions

View File

@ -15,22 +15,20 @@ namespace UnityExplorer.UI.Widgets
typeCompleter.Enabled = true;
typeCompleter.BaseType = this.genericArgument;
typeCompleter.CacheTypes();
Type[] constraints = this.genericArgument.GetGenericParameterConstraints();
typeCompleter.GenericConstraints = constraints;
typeCompleter.CacheTypes();
StringBuilder sb = new($"<color={SignatureHighlighter.CONST}>{this.genericArgument.Name}</color>");
for (int j = 0; j < constraints.Length; j++)
for (int i = 0; i < constraints.Length; i++)
{
if (j == 0) sb.Append(' ').Append('(');
if (i == 0) sb.Append(' ').Append('(');
else sb.Append(',').Append(' ');
sb.Append(SignatureHighlighter.Parse(constraints[j], false));
sb.Append(SignatureHighlighter.Parse(constraints[i], false));
if (j + 1 == constraints.Length)
if (i + 1 == constraints.Length)
sb.Append(')');
}