2014-01-25 27 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(); 
      ... 
     });