Open dealproc opened 10 years ago
You generally don't want RegisterAllTypesFromNamespace
(which is a PITA, because a single namespace can be in multiple assemblies, and there is no way to get all types in a given namespace), rather you want RegisterAllTypesFromAssembly(Assembly assembly)
.
Could we register all types in Namespace X, that are in Assembly Y?
Yeah, that's doable. Basically, just get all types, then filter on namespace. Simple LINQ query.
So the part i'm trying to figure out is what the signature (interface) for this looks like. What I want is a way to quickly have a user create 1 class that implements the abstract or interface, and they can quickly setup the interaction in < 5 minutes. It would go a long way in a demo talk, like what Stachu is doing next week, to prove .NET is as good as RoR, etc.
If you gents have other concepts/ideas on what else the registration bit needs (or should do), let's expand the OP on this and let's define it out.
My 2c, we probably want to play with this a bit to find out what works best.. I'd suggest we just put something hacky down then once we discover the pain points and what the typical uses looks like.. we can optimise for SDHP (super dooper happy path?),
We should provide an abstract class with a protected "Register" method.