From fea4547613d57f8fcc8cb94671c54d82a5b11dbb Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Fri, 13 Dec 2019 00:23:55 +0200 Subject: Added browser cef loading error support. Implemented better module loading error handling in general. --- .../Tango.Core/ExtensionMethods/AssemblyExtensions.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Software/Visual_Studio/Tango.Core') diff --git a/Software/Visual_Studio/Tango.Core/ExtensionMethods/AssemblyExtensions.cs b/Software/Visual_Studio/Tango.Core/ExtensionMethods/AssemblyExtensions.cs index f75e76d3a..bad90d47f 100644 --- a/Software/Visual_Studio/Tango.Core/ExtensionMethods/AssemblyExtensions.cs +++ b/Software/Visual_Studio/Tango.Core/ExtensionMethods/AssemblyExtensions.cs @@ -33,5 +33,17 @@ public static class AssemblyExtensions .AddDays(version.Revision); } } + + public static IEnumerable GetLoadableTypes(this Assembly assembly) + { + try + { + return assembly.GetTypes(); + } + catch (ReflectionTypeLoadException e) + { + return e.Types.Where(t => t != null); + } + } } -- cgit v1.3.1