如何从Autofac app.config文件注册类型

时间:2016-09-06 23:59:24

标签: autofac autofac-module

在我的容器的构建中,我想通过配置文件

提供其中一行
  //-------------------------------------------------------------------------
  //NOTE: Depending on the PerformanceCategoryDefine in Configuration file
  // -will depend on which engine should be used -- choose one only
  //

  //builder.RegisterType<RemoteFxNetworkTransmitEngine>().As<IPerfCounterCategoryNameTransmitEngine>();

  //builder.RegisterType<TerminalServicesSessionTransmitEngine>().As<IPerfCounterCategoryNameTransmitEngine>();

  //---------------------------

使用此处的示例:http://docs.autofac.org/en/latest/configuration/modules.html#encapsulated-configuration

但它相当有限,而不是一个完整的例子。出于某种原因,我也无法找到ConfigurationSettingsReader类。

我使用的是Autofac 4.1版,因为之前的question现已超过5年了,我一直在思考这个问题。&#39;不再相关。

0 个答案:

没有答案
相关问题