@@ -54,7 +54,7 @@ public int GetHashCode((Type, Type[]) obj)
54
54
private static readonly string TypeHelperNamespace = typeof ( TypeHelper ) . Namespace ;
55
55
56
56
#if NET8_0_OR_GREATER
57
- private static readonly ConcurrentDictionary < ( Type , Type [ ] ) , ConstructorInvoker > ConstructorInfoByTypes =
57
+ private static readonly ConcurrentDictionary < ( Type , Type [ ] ) , ConstructorInvoker > ConstructorInvokersByTypes =
58
58
#else
59
59
private static readonly ConcurrentDictionary < ( Type , Type [ ] ) , ConstructorInfo > ConstructorInfoByTypes =
60
60
#endif
@@ -661,7 +661,7 @@ public static object Activate(this Type type, Type[] genericArguments, params ob
661
661
/// </exception>
662
662
#if NET8_0_OR_GREATER
663
663
public static ConstructorInvoker GetSingleConstructorInvoker ( this Type type , Type [ ] argumentTypes ) =>
664
- ConstructorInfoByTypes . GetOrAdd ( ( type , argumentTypes ) ,
664
+ ConstructorInvokersByTypes . GetOrAdd ( ( type , argumentTypes ) ,
665
665
static t => ConstructorExtractor ( t ) is ConstructorInfo ctor
666
666
? ConstructorInvoker . Create ( ctor )
667
667
: throw new InvalidOperationException ( Strings . ExGivenTypeHasNoOrMoreThanOneCtorWithGivenParameters ) ) ;
@@ -684,7 +684,7 @@ public static ConstructorInfo GetSingleConstructor(this Type type, Type[] argume
684
684
[ CanBeNull ]
685
685
#if NET8_0_OR_GREATER
686
686
public static ConstructorInvoker GetSingleConstructorInvokerOrDefault ( this Type type , Type [ ] argumentTypes ) =>
687
- ConstructorInfoByTypes . GetOrAdd ( ( type , argumentTypes ) ,
687
+ ConstructorInvokersByTypes . GetOrAdd ( ( type , argumentTypes ) ,
688
688
static t => ConstructorExtractor ( t ) is ConstructorInfo ctor ? ConstructorInvoker . Create ( ctor ) : null ) ;
689
689
#else
690
690
public static ConstructorInfo GetSingleConstructorOrDefault ( this Type type , Type [ ] argumentTypes ) =>
@@ -714,7 +714,6 @@ from pair in zipped
714
714
return constructors . SingleOrDefault ( ) ;
715
715
} ;
716
716
717
-
718
717
/// <summary>
719
718
/// Orders the specified <paramref name="types"/> by their inheritance
720
719
/// (very base go first).
@@ -956,12 +955,6 @@ public static MethodInvoker CachedMakeGenericMethodInvoker(this MethodInfo gener
956
955
957
956
public static MethodInvoker CachedMakeGenericMethodInvoker ( this MethodInfo genericDefinition , Type typeArgument1 , Type typeArgument2 ) =>
958
957
GenericMethodInvokers2 . GetOrAdd ( ( genericDefinition , typeArgument1 , typeArgument2 ) , GenericMethodInvokerFactory2 ) ;
959
- #else
960
- public static MethodInfo CachedMakeGenericMethodInvoker ( this MethodInfo genericDefinition , Type typeArgument ) =>
961
- CachedMakeGenericMethod ( genericDefinition , typeArgument ) ;
962
-
963
- public static MethodInfo CachedMakeGenericMethodInvoker ( this MethodInfo genericDefinition , Type typeArgument1 , Type typeArgument2 ) =>
964
- CachedMakeGenericMethod ( genericDefinition , typeArgument1 , typeArgument2 ) ;
965
958
#endif
966
959
967
960
public static Type CachedMakeGenericType ( this Type genericDefinition , Type typeArgument ) =>
0 commit comments