I\'m trying to get all classes that implement a certain abstract class. I\'m trying to do that with the following code:
var type = typeof(BaseViewComponent);
using System.Reflection;
using Microsoft.Extensions.DependencyModel;
var asmNames = DependencyContext.Default.GetDefaultAssemblyNames();
var type = typeof(BaseViewComponent);
var allTypes = asmNames.Select(Assembly.Load)
.SelectMany(t => t.GetTypes())
.Where(p => p.GetTypeInfo().IsSubclassOf(type));