Autofac has a nice option to set the constructor resolve policy.
e.g. By using the MostParametersConstructorSelector
:
builder.RegisterType<MyClass>()
.AsImplementedInterfaces()
.UsingConstructor(new MostParametersConstructorSelector());
Is there an option to set the default ConstructorSelector
?
I tried:
builder.RegisterType<MostParametersConstructorSelector>().As<IConstructorSelector>();
Can't find it in the docs or source code of Autofac