BrickPile.Core.Extensions.AssemblyExtensions.TryGetTypes C# (CSharp) Method

TryGetTypes() public static method

public static TryGetTypes ( this assm ) : IEnumerable
assm this
return IEnumerable
        public static IEnumerable<Type> TryGetTypes(this Assembly assm)
        {
            try
            {
                return assm.GetTypes();
            }
            catch (ReflectionTypeLoadException e)
            {
                return e.Types.Where(t => t != null);
            }
        }
AssemblyExtensions