在Register当中有以下代码:
private void Register()
{
...
_builer.RegisterType<BaseConnectionFactory>().As<IBaseConnectionFactory>().InstancePerLifetimeScope();
...
}
publi abstrct class BaseConnectionFactory
{
//...other code...
}注册之后提示异常信息:
Autofac.Core.DependencyResolutionException:“No constructors on type 'PDL.DoubleCenter.Infrastructure.BaseConnectionFactory' can be found with the constructor finder 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder'.”之后查阅相关资料无果,之后尝试将abstrct取消之后正常注册。