mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-08 18:06:34 +00:00
Filter out invalid types first
This commit is contained in:
@@ -131,6 +131,11 @@ namespace BinaryObjectScanner.Data
|
||||
/// </summary>
|
||||
private static List<T> InitCheckClasses<T>(Assembly assembly)
|
||||
{
|
||||
// Get information from the type param
|
||||
string? interfaceName = typeof(T).FullName;
|
||||
if (interfaceName == null)
|
||||
return [];
|
||||
|
||||
// If not all types can be loaded, use the ones that could be
|
||||
Type?[] assemblyTypes;
|
||||
try
|
||||
@@ -142,11 +147,6 @@ namespace BinaryObjectScanner.Data
|
||||
assemblyTypes = rtle.Types ?? [];
|
||||
}
|
||||
|
||||
// Get information from the type param
|
||||
string? interfaceName = typeof(T).FullName;
|
||||
if (interfaceName == null)
|
||||
return [];
|
||||
|
||||
// Loop through all types
|
||||
List<T> classTypes = [];
|
||||
foreach (Type? type in assemblyTypes)
|
||||
|
||||
Reference in New Issue
Block a user