StructureMap可以按需加载模块/程序集吗?

时间:2009-11-07 22:21:55

标签: assemblies inversion-of-control structuremap

StructureMap中是否有设施允许我按需在其他模块(程序集)中加载服务,就像在Unity中完成一样?

1 个答案:

答案 0 :(得分:0)

喜欢这个?

            Assembly ass = Assembly.GetCallingAssembly();
        Container.Configure(x => x.Scan(scan =>
        {
            scan.Assembly(ass); 
            scan.LookForRegistries();
        }));