我希望ConfigurableBootstrapper能够发现我的所有模块,而不是全部列出它们。我找不到这个属性。我不想要明确列出类型数组
var bootstrapper = new ConfigurableBootstrapper(with =>
{
with.Modules(new Type[] {typeof (CompanyModule), typeof (UserModule)});
with.Dependency<IDocumentSession>(RavenEmbeddedStore.Instance.Store.OpenSession());
});
答案 0 :(得分:1)
似乎AllDiscoveredModules()
是你需要的方法:
var bootstrapper = new ConfigurableBootstrapper(with =>
{
with.AllDiscoveredModules();
...
});