-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Description
I have a class that implements these two constructors:
public LoggerFactory(IEnumerable<ILoggerProvider> providers, LoggerFilterOptions filterOptions)
public LoggerFactory(IEnumerable<ILoggerProvider> providers, IOptionsMonitor<LoggerFilterOptions> filterOption)
Given there is a service registration for IEnumerable<ILoggerProvider>
and for IOptionsMonitor<LoggerFilterOptions>
, but no registration for LoggerFilterOptions
. If the container is configured without WithUnknownTypeResolution
, everything works fine, the second constructor is selected. But if WithUnknownTypeResolution
is used, then the first constructor is choosed, regardless whether the second constructor is fully resolvable or not.
I would expect that unknown type resolution only runs if no constructor matches completely.