Skip to content
JPVenson edited this page Jan 15, 2022 · 3 revisions

The Morestachio Runner assembly wraps the loading of data and the creation of the template. You can invoke the assembly by using following arguments:

Mandatory Arguments:

  • --source-type must by one of:
    • Json will expect the --source-data argument to be a file path to an json document that can be parsed
    • Xml (Unsupported)
    • NetFunction requires the presence of --source-data-net-type, --source-data-net-function to load an assembly from --source-data and search for an type --source-data-net-type and then executes a public static object ANYNAME() declared with --source-data-net-function
  • --source-data The Data string related to the --source-type. Should in general be an path to a file on disk
  • --target-path The full path including the filename where the result should be stored

Optional Arguments:

  • --build-log If set a log of everything written to the console will be saved at the location and the console will never stop to request user input

--source-type NetFunction

if you set the source type to NetFunction you also have to set the following arguments:

  • --source-data-net-type if --source-type is NetFunction then it is expected that this is the fully quallified path to the type to be executed
  • --source-data-net-function if --source-type is NetFunction then it is expected that this is the path to the method to be executed

For example, the List of all predefined formatters is created with the Morestachio.Runner, this list is invoke by the following call:

Example:
Morestachio.Runner.exe --source-type NetFunction --source-data "Morestachio.Runner.dll" --source-data-net-type "Morestachio.Runner.Program" --source-data-net-function "GetMorestachioFormatterDocumentation" --target-path "documentation-out.md" --template-data "documentation.md"