jammycakes / factoryfactory

Yet another IOC container for .NET, designed from the ground up to support the ASP.NET Core DI abstractions.
MIT License
0 stars 1 forks source link

Constructor selection: favour non-optional arguments over optional arguments #22

Open jammycakes opened 6 years ago

jammycakes commented 6 years ago

Constructors are currently selected on the basis of which has the greatest number of arguments altogether, ignoring whether they can be resolved or whether they are optional arguments. This behaviour should be preserved, but when there is a tie, the one with the greatest number of non-optional arguments should prevail.

We should also give thought to whether or not we should also consider explicit versus implicit registrations.