mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-15 13:57:31 +08:00
Remove call to obsolete methods
This commit is contained in:
parent
b5e3cc2ea5
commit
81a174f865
@ -135,7 +135,7 @@ namespace UnityExplorer.ObjectExplorer
|
||||
|
||||
foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies())
|
||||
{
|
||||
foreach (Type type in asm.TryGetTypes())
|
||||
foreach (Type type in asm.GetTypes())
|
||||
{
|
||||
if (!string.IsNullOrEmpty(nameFilter) && !type.FullName.ContainsIgnoreCase(nameFilter))
|
||||
continue;
|
||||
@ -173,7 +173,7 @@ namespace UnityExplorer.ObjectExplorer
|
||||
foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies())
|
||||
{
|
||||
// Search all non-static, non-enum classes.
|
||||
foreach (Type type in asm.TryGetTypes().Where(it => !(it.IsSealed && it.IsAbstract) && !it.IsEnum))
|
||||
foreach (Type type in asm.GetTypes().Where(it => !(it.IsSealed && it.IsAbstract) && !it.IsEnum))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -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(')');
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user