Fix introspection of dynamic assemblies
All checks were successful
Build / Compute Version (push) Successful in 5s
Build / Build Nuget package (CringeBootstrap.Abstractions) (push) Successful in 7m22s
Build / Build Nuget package (NuGet) (push) Successful in 6m52s
Build / Build Nuget package (CringePlugins) (push) Successful in 7m59s
Build / Build Nuget package (SharedCringe) (push) Successful in 6m17s
Build / Build Launcher (push) Successful in 9m57s

Log incorrect config method instead of throwing exception
This commit is contained in:
2024-11-03 21:51:00 -05:00
parent a087efa4dd
commit cca25e438d
2 changed files with 26 additions and 5 deletions

View File

@@ -34,6 +34,12 @@ public static class IntrospectionPatches
if (AssemblyLoadContext.GetLoadContext(__instance) is ICoreLoadContext || __instance.FullName?.StartsWith("System.") == true)
return true;
if (__instance.IsDynamic)
{
__result = [];
return false;
}
if (AssemblyLoadContext.GetLoadContext(__instance) is ModAssemblyLoadContext or DerivedAssemblyLoadContext)
{
//mods need to look for specific derived types