1 // See https://aka.ms/new-console-template for more information
\r
7 static int command_dispatch(string[] args) {
\r
9 // check runtime parameters
\r
10 if (args.Length < 2) throw new ApplicationException("mdoc needs 2 arguments.");
\r
12 string file = args[0];
\r
13 string template = args[1];
\r
15 Worker w = new Worker();
\r
16 return w.convert(file, template);
\r
18 public static int Main(string[] argv){
\r
19 Console.WriteLine("mdoc");
\r
21 string usage = "mdoc <source> <target-format>";
\r
23 if (argv.Length < 1) {
\r
24 Console.WriteLine(usage);
\r
29 int ret = command_dispatch(argv);
\r
31 Console.WriteLine(usage);
\r
35 catch (Exception e) {
\r
36 Console.WriteLine(e.ToString());
\r
37 throw new Exception(e.ToString());
\r