/// <summary> /// If the adapted method is a generic method definition with the supplied number and /// type of parameters, closes the method with the supplied arguments /// </summary> /// <param name="args"></param> /// <returns></returns> public Option <ClrMethod> CloseGenericMethod(params ClrType[] args) => Try(() => ClrMethod.Get(ReflectedElement.MakeGenericMethod(array(args, a => a.ReflectedElement))));
public static Option <ClrMethod> method(Type declaringType, string name, params Type[] argTypes) => declaringType.MatchMethod(name, argTypes).Map(x => ClrMethod.Get(x));