src/Mimp.SeeSharper.Reflection/TypeExtensions.Constructor.cs
/// <summary>
/// Return a compiled delegate to invoke a constructor - that match <paramref name="types"/> - with a array of parameters.
/// </summary>
/// <param name="type"></param>
/// <param name="types"></param>
/// <returns></returns>
/// <exception cref="ArgumentNullException"></exception>
/// <exception cref="InvalidOperationException">If no matching constructor exists.</exception>
Return a compiled delegate to invoke a constructor - that match  - with a array of parameters.
Return a compiled delegate to invoke a constructor - that match - with a array of parameters .
public static Delegate GetNewParameterDelegate(this Type type, IEnumerable<Type> types)
        {
            if (type is null)
                throw new ArgumentNullException(nameof(type));
            if (types is null)
                throw new ArgumentNullException(nameof(types));
            if (types.Any(t => t is null))
                throw new ArgumentNullException(nameof(types), "At least on type is null");
            return type.GetNewParameterDelegate(types, Expression.GetFuncType(types.Concat(new[] { type }).ToArray()));
        }
public static Delegate GetNewParameterDelegate ( this Type type , IEnumerable < Type > types ) { if ( type is null ) throw new ArgumentNullException ( nameof ( type ) ) ; if ( types is null ) throw new ArgumentNullException ( nameof ( types ) ) ; if ( types . Any ( t => t is null ) ) throw new ArgumentNullException ( nameof ( types ) , " " ) ; return type . GetNewParameterDelegate ( types , Expression . GetFuncType ( types . Concat ( new [ ] { type } ) . ToArray ( ) ) ) ; }
Return a compiled delegate to invoke a constructor - that match  - with a array of parameters.
Return a compiled delegate to invoke a constructor - that match - with a array of parameters .
None
None
If no matching constructor exists.
If no matching constructor exists .
Type
this
<not_specific>
types
IEnumerable<Type>
None
type
<not_specific>
None