MS PnP Unity是否扫描诸如StructureMap之类的装配体? [英] Does MS PnP Unity Scan for Assemblies Like StructureMap?

查看:137
本文介绍了MS PnP Unity是否扫描诸如StructureMap之类的装配体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

In Using StructureMap 2.5 to scan all assemblies in a folder, we can see that StructureMap uses AssembliesFromPath() to explicitly look for types to resolve. What is the equivalent of this in Microsoft Unity? Because Unity is such a generic term, searching for documents about this online is not that easy.

更新:Unity有一个叫做组装匹配规则,但是它的描述并没有告诉我它扫描了文件夹.

Update: Unity has something called an Assembly Matching Rule but its description does not communicate to me that it scans folders.

推荐答案

程序集匹配规则用于将侦听应用于Unity构造的类,而不用于容器注册. Unity本身没有任何基于约定的扫描功能,例如StructureMap.虽然有一个CodePlex项目,但它向Unity添加了类似的功能. http://autoregistration.codeplex.com/

The Assembly Matching Rule is used for applying interception to classes constructed by Unity and not for container registration. Unity itself does not have any convention-based scanning functionality like StructureMap. There is a CodePlex project that adds similar functionality to Unity though. http://autoregistration.codeplex.com/

这篇关于MS PnP Unity是否扫描诸如StructureMap之类的装配体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆