DaniilSokolyuk/DS.Unity.Extensions.DependencyInjection

Func<Parameter> is not resolved correctly

Opened this issue · 0 comments

Hey, it's me again.
Now Func are not resolved correctly. Unity by default resolve Func into factory of Abc class, you don't have to register Func<Abc>
public FileParserFactory(Func<TradesFileParser> tradeParserFactory)

 if (arg.ParameterType.IsClass && !arg.ParameterType.IsAbstract)
            {
                if (typeof(Delegate).GetTypeInfo().IsAssignableFrom(arg.ParameterType) || 
                    typeof(string) == arg.ParameterType ||
                    arg.ParameterType.IsEnum || 
                    arg.ParameterType.IsPrimitive)
                {
                    return IsRegistered(arg.ParameterType);
                }

                return true;
            }