-
-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Hi,
The AllClasses.FromAssembliesInBasePath() does not work for web applications.
Since all our applications (web/service/console apps) in the solution use the same container bootstrap logic, it would be nice to let the registration by convention work for all types of applications.
Second: it would be nice to increase the performance of it by providing an overload of this method which can filter the assembly names.
My suggestion is to use code from StructureMap (end-of-life DI container), more specific:
The code in AllClasses.FromAssembliesInBasePath() can use the same code from:
AssemblyFinder.FindAssemblies(func,func,bool)
https://github.com/structuremap/structuremap/blob/master/src/StructureMap/Graph/AssemblyFinder.cs
Result:
- It always loads the assemblies needed, also for web applications.
- It is much faster since you can filter the assembly names (eg. fullName.startsWith( "Foo")) before loading each type from the assemblies.
I think this is a quick win for this repo ;)