private void RegisterGenericRepositories() { var dbContextTypes = _typeFinder.GetAllTypes(type => type.IsPublic && !type.IsAbstract && type.IsClass && typeof(DbContext).IsAssignableFrom(type) ); if (dbContextTypes.IsNullOrEmpty()) { return; } foreach (var dbContextType in dbContextTypes) { EfRepositoryRegistrar.RegisterForDbContext(dbContextType, IocManager); } }
public void TypeFinder() { var types1 = _typeFinder.GetAllTypes(); }
/// <summary> /// 查找所有组件。 /// </summary> /// <returns>返回组件列表。</returns> public List <Type> FindAll() { return(_typeFinder.GetAllTypes(ComponentBase.IsComponent).ToList()); }