AssemblyExtensions
using System.Collections.Generic;
using System.Linq;
namespace System.Reflection
{
internal static class AssemblyExtensions
{
public static IEnumerable<Type> CollectTypes(this Assembly assembly)
{
return assembly.ExportedTypes.Concat(from typeInfo in assembly.DefinedTypes
select typeInfo.AsType()).Distinct();
}
}
}