From a85998ebf6657eb874ec4a773317ccc03a681fb8 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sat, 20 Sep 2025 16:55:54 -0400 Subject: [PATCH] Filter out invalid types first --- BinaryObjectScanner/Data/StaticChecks.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/BinaryObjectScanner/Data/StaticChecks.cs b/BinaryObjectScanner/Data/StaticChecks.cs index 8adbb155..4f0330c4 100644 --- a/BinaryObjectScanner/Data/StaticChecks.cs +++ b/BinaryObjectScanner/Data/StaticChecks.cs @@ -131,6 +131,11 @@ namespace BinaryObjectScanner.Data /// private static List InitCheckClasses(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 classTypes = []; foreach (Type? type in assemblyTypes)