diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.Core')
| -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); + } + } } |
