diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-12-13 00:23:55 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-12-13 00:23:55 +0200 |
| commit | fea4547613d57f8fcc8cb94671c54d82a5b11dbb (patch) | |
| tree | 19db6439b6694884da2414df5d6ae92ba2464bcf /Software/Visual_Studio/Tango.Core/ExtensionMethods | |
| parent | 85e27ca4c292329a894a49ed950912285465fa2e (diff) | |
| download | Tango-fea4547613d57f8fcc8cb94671c54d82a5b11dbb.tar.gz Tango-fea4547613d57f8fcc8cb94671c54d82a5b11dbb.zip | |
Added browser cef loading error support.
Implemented better module loading error handling in general.
Diffstat (limited to 'Software/Visual_Studio/Tango.Core/ExtensionMethods')
| -rw-r--r-- | Software/Visual_Studio/Tango.Core/ExtensionMethods/AssemblyExtensions.cs | 12 |
1 files changed, 12 insertions, 0 deletions
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<Type> GetLoadableTypes(this Assembly assembly) + { + try + { + return assembly.GetTypes(); + } + catch (ReflectionTypeLoadException e) + { + return e.Types.Where(t => t != null); + } + } } |
