Allow running an application using a function call - MyApp.invoke(...)

The invoke method is similar to the run method, except that it takes its arguments from the method call instead of the command line, which means skipping the parsing phase.