- The GetType lag situation is less crazy.

This commit is contained in:
Maplewheels
2026-01-25 17:15:54 -05:00
parent b626fd1e47
commit adf9303a7e

View File

@@ -130,16 +130,14 @@ public class PluginManagementService : IPluginManagementService, IAssemblyManage
}
}
//TODO: the lag situation here is craazy
var t = AssemblyLoadContext.All
.SelectMany(alc => alc.Assemblies)
.SelectMany(ass => ass.GetSafeTypes())
.FirstOrDefault(tp => tp.FullName?.Equals(typeName) ?? tp.Name.Equals(typeName), null);
return t;
//TODO: implement ALC resolutions.
throw new NotImplementedException();
foreach (var ass in AssemblyLoadContext.All.SelectMany(alc => alc.Assemblies))
{
if (ass.GetType(typeName, false) is not { } type)
{
continue;
}
return isByRefType ? type.MakeByRefType() : type;
}
}
public FluentResults.Result LoadAssemblyResources(ImmutableArray<IAssemblyResourceInfo> resource)