src/Mimp.SeeSharper.Reflection/MethodInfoExtensions.cs
/// <summary>
/// Return a function to invoke the method with the instance and a array of parameters.
/// </summary>
/// <param name="method"></param>
/// <returns></returns>
/// <exception cref="ArgumentNullException"></exception>
/// <exception cref="InvalidOperationException">If the method isn't function.</exception>
Return a function to invoke the method with the instance and a array of parameters.
Return a function to invoke the method with the instance and a array of parameters .
public static Func<object, object?[], object?> GetInstanceParameterFunc(this MethodInfo method)
        {
            if (method is null)
                throw new ArgumentNullException(nameof(method));
            return method.GetInstanceParameterDelegate<Func<object, object?[], object?>>();
        }
public static Func < object , object ? [ ] , object ? > GetInstanceParameterFunc ( this MethodInfo method ) { if ( method is null ) throw new ArgumentNullException ( nameof ( method ) ) ; return method . GetInstanceParameterDelegate < Func < object , object ? [ ] , object ? > > ( ) ; }
Return a function to invoke the method with the instance and a array of parameters.
Return a function to invoke the method with the instance and a array of parameters .
None
None
If the method isn't function.
If the method isn ' t function .
MethodInfo
this
method
None