private static ConstructorInfo FindCtorBySignature( IEnumerable <ConstructorInfo> constructors, object[] parameters) { return(parameters.Length == 0 ? FindDefaultCtor(constructors) : ArgumentSignatureMatcher.FindBestMatching(constructors, parameters)); }
private static Result InvokeMethod <T>( bool @static, object target, string methodName, params object[] parameters) { var methods = FindMethodsByName <T>(methodName, @static: @static); var method = ArgumentSignatureMatcher.FindBestMatching(methods, parameters); return(Invoke(@static, method, target, parameters)); }