Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们正在使用 autofac,我注意到 ContainerBuilder 的 RegisterComponent 方法。我找不到任何它的用法示例,这是否意味着由客户端代码使用?如果是这样,有关如何使用它的任何示例?
RegisterComponent 主要用于较低级别的 Autofac 支持/扩展,例如,如果您正在创建手动构建组件注册的自定义注册源。如果您搜索 Autofac 源代码,您可以找到它的用途。
一般来说,大多数客户端代码不会使用该方法。