Stashbox by Peter Csajtai

<PackageReference Include="Stashbox" Version="3.2.4-preview-587" />

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