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