Add Overrides From Assembly
Hi,
Reasonably new to FluentNHiberate (go easy on me!) - I want to add all overrides from any of my loaded assemblies.I loop over the loaded assemblies, and search for types that implement IAutoMappingOverride, if I find one then I want to include all overrides from that assembly .
.UserOverridesFromAssemblyOf wont work in this scenario as I won;t know what T is at compile time.
Is there a .UseOverridesFromAssembly(Assembly assembly) option or workaround?
Many thanks for your help
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by James Gregory on 23 Mar, 2010 01:41 PM
It's not you, we're missing an overload it seems!
If you're able to update to the latest build, I've just committed a new method:
UseOverridesFromAssembly(Assembly assembly)
.Otherwise, you'll have to do something nasty with reflection. I can help you with that if need be, but hopefully you can just use the new method.
3 Posted by Ieuan on 23 Mar, 2010 07:31 PM
Hey thanks a lot - that was pretty rapid!
Support Staff 4 Posted by James Gregory on 23 Mar, 2010 08:24 PM
No problemo.
James Gregory resolved this discussion on 23 Mar, 2010 08:24 PM.