Skip to content

BaseJsonTextsGenerator.RunIf method

Runs the generator when the first argument is Command, as the dynamic data generator does for its own command, so that the application can exit with the code that it returns.

public virtual int? RunIf(string[] args)
parameter description
args The command line arguments.

Return Value

null when args is not the command of the generator, so the application should start normally; otherwise the exit code the caller should return: 0 on success, 1 when the generator throws, 2 for extra arguments.

See Also