@@ -46,12 +46,30 @@ public override int Score(IContext context, ConstructorInjectionDirective direct
4646 if ( directive . Constructor . GetParameters ( ) . Length == 1 &&
4747 directive . Constructor . GetParameters ( ) [ 0 ] . ParameterType . IsGenericType )
4848 {
49- return 1 ;
50- }
51- else
52- {
53- return 0 ;
49+ var parameterGenericType = directive . Constructor . GetParameters ( ) [ 0 ] . ParameterType . GetGenericTypeDefinition ( ) ;
50+ if ( parameterGenericType == typeof ( Func < > )
51+ || parameterGenericType == typeof ( Func < , > )
52+ || parameterGenericType == typeof ( Func < , , > )
53+ || parameterGenericType == typeof ( Func < , , , > )
54+ || parameterGenericType == typeof ( Func < , , , , > )
55+ || parameterGenericType == typeof ( Func < , , , , , > )
56+ || parameterGenericType == typeof ( Func < , , , , , , > )
57+ || parameterGenericType == typeof ( Func < , , , , , , , > )
58+ || parameterGenericType == typeof ( Func < , , , , , , , , > )
59+ || parameterGenericType == typeof ( Func < , , , , , , , , , > )
60+ || parameterGenericType == typeof ( Func < , , , , , , , , , , > )
61+ || parameterGenericType == typeof ( Func < , , , , , , , , , , , > )
62+ || parameterGenericType == typeof ( Func < , , , , , , , , , , , , > )
63+ || parameterGenericType == typeof ( Func < , , , , , , , , , , , , , > )
64+ || parameterGenericType == typeof ( Func < , , , , , , , , , , , , , , > )
65+ || parameterGenericType == typeof ( Func < , , , , , , , , , , , , , , , > )
66+ || parameterGenericType == typeof ( Func < , , , , , , , , , , , , , , , , > ) )
67+ {
68+ return 1 ;
69+ }
5470 }
71+
72+ return 0 ;
5573 }
5674 else
5775 {
0 commit comments