Add Overrides From Assembly

Original Post Ieuan's Avatar

Ieuan

22 Mar, 2010 11:36 PM via web

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

  1. Support Staff 2 Posted by James Gregory on 23 Mar, 2010 01:41 PM

    James Gregory's Avatar

    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.

  2. 3 Posted by Ieuan on 23 Mar, 2010 07:31 PM

    Ieuan's Avatar

    Hey thanks a lot - that was pretty rapid!

  3. Support Staff 4 Posted by James Gregory on 23 Mar, 2010 08:24 PM

    James Gregory's Avatar

    No problemo.

  4. James Gregory resolved this discussion on 23 Mar, 2010 08:24 PM.

Comments are currently closed for this discussion. You can start a new one.

Recent Discussions

05 Jul, 2010 10:29 PM
05 Jul, 2010 12:45 PM
05 Jul, 2010 12:42 PM
05 Jul, 2010 12:17 PM
05 Jul, 2010 12:12 PM

 

03 Jul, 2010 12:26 AM
02 Jul, 2010 02:17 PM
02 Jul, 2010 08:18 AM
02 Jul, 2010 12:20 AM
01 Jul, 2010 10:14 PM