2014-01-25 64 views
0

我希望ConfigurableBootstrapper能夠發現我的所有模塊,而不必全部列出它們。我無法找到這個屬性。我不希望有列出類型的數組明確發現南希的所有模塊ConfigurableBootstrapper

var bootstrapper = new ConfigurableBootstrapper(with => 
      { 
       with.Modules(new Type[] {typeof (CompanyModule), typeof (UserModule)}); 
       with.Dependency<IDocumentSession>(RavenEmbeddedStore.Instance.Store.OpenSession()); 
      }); 

回答

1

好像AllDiscoveredModules()是你需要的方法:

var bootstrapper = new ConfigurableBootstrapper(with => 
     { 
      with.AllDiscoveredModules(); 
      ... 
     });