Stashbox by Peter Csajtai

<PackageReference Include="Stashbox" Version="3.1.0-preview-537" />

 AssemblyExtensions

static class 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(); } } }