mirror of
https://github.com/codewriter-packages/Tri-Inspector.git
synced 2025-01-22 08:18:49 -05:00
Ignore ReflectionTypeLoadException
This commit is contained in:
parent
0841d5e9dd
commit
e6138b340b
@ -34,7 +34,17 @@ namespace TriInspector.Utilities
|
||||
if (_allNonAbstractTypesBackingField == null)
|
||||
{
|
||||
_allNonAbstractTypesBackingField = Assemblies
|
||||
.SelectMany(asm => asm.GetTypes())
|
||||
.SelectMany(asm =>
|
||||
{
|
||||
try
|
||||
{
|
||||
return asm.GetTypes();
|
||||
}
|
||||
catch (ReflectionTypeLoadException)
|
||||
{
|
||||
return Array.Empty<Type>();
|
||||
}
|
||||
})
|
||||
.Where(type => !type.IsAbstract)
|
||||
.ToList();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user