Whatever ... it's best to filter anyway. On Feb 17, 3:01 pm, NickNH <cadil...@gmail.com> wrote: > Your suggestion works well. Thank you. > > However, I also tried to be lazy and pass no filter at all (meaning > that all assemblies in the bin folder are returned). > It produced this exception: > > 'FluentNHibernate.IMappingProvider, FluentNHibernate, > Version=1.0.0.595, Culture=neutral, PublicKeyToken=8aa435e3cb308880' > is missing a parameterless constructor. > > If the FluentNHibernate is in the lot, it reacts badly? > > N. > > On Feb 17, 2:48 pm, James Gregory <jagregory....@gmail.com> wrote: > > > We don't support that yet, but it is in the pipeline. > > > You'll have to roll something yourself, but it shouldn't be too difficult. > > > Something like this should work:http://pastie.org/829499 > > > On Wed, Feb 17, 2010 at 7:12 PM, NickNH <cadil...@gmail.com> wrote: > > > Hi, > > > > is there a way to auto-discover ClassMap classes in all (or in a > > > subset of) assemblies that are under a given folder? I'm in an asp.net > > > project with various assemblies coming from 3rd parties and containing > > > ClassMap classes. > > > > With structuremap I can write something like: > > > > ObjectFactory.Initialize(x => > > > { > > > x.Scan(s => > > > { > > > s.AssembliesFromApplicationBaseDirectory(assembly => > > > assembly.GetName().Name.ToLower().Contains(".web")); > > > s.LookForRegistries(); > > > }); > > > }); > > > > For NH I was looking for something like: > > > > var cfg = Fluently.Configure() > > > .Mappings(m => > > > m.FluentMappings.AddFromAssembliesFromApplicationBaseDirectory( > > > assembly => > > > assembly.GetName().Name.ToLower().Contains(".web"))); > > > > Thx > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "Fluent NHibernate" group. > > > To post to this group, send email to fluent-nhibern...@googlegroups.com. > > > To unsubscribe from this group, send email to > > > fluent-nhibernate+unsubscr...@googlegroups.com<fluent-nhibernate%2bunsubscr...@googlegroups.com> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/fluent-nhibernate?hl=en. > >
-- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibern...@googlegroups.com. To unsubscribe from this group, send email to fluent-nhibernate+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en.