(string[] args)
| 13 | } |
| 14 | |
| 15 | static int SubMain(string[] args) |
| 16 | { |
| 17 | string directory = "."; |
| 18 | string template = "template.txt"; |
| 19 | string outputfile = "output.txt"; |
| 20 | string file = null; |
| 21 | |
| 22 | if (args.Length == 0 || (args.Length == 1 && args[0] == "-h")) |
| 23 | { |
| 24 | PrintHelp(); |
| 25 | return 0; |
| 26 | } |
| 27 | |
| 28 | for (int i=0; i<args.Length-1; i++) |
| 29 | { |
| 30 | if (args[i] == "-d") |
| 31 | { |
| 32 | directory = args[i + 1]; |
| 33 | } |
| 34 | |
| 35 | if (args[i] == "-t") |
| 36 | { |
| 37 | template = args[i + 1]; |
| 38 | } |
| 39 | |
| 40 | if (args[i] == "-o") |
| 41 | { |
| 42 | outputfile = args[i + 1]; |
| 43 | } |
| 44 | |
| 45 | if (args[i] == "-f") |
| 46 | { |
| 47 | file = args[i + 1]; |
| 48 | } |
| 49 | |
| 50 | if (args[i] == "-h") |
| 51 | { |
| 52 | if (args[i + 1] == "template") |
| 53 | { |
| 54 | PrintTemplateHelp(); |
| 55 | return 0; |
| 56 | } |
| 57 | PrintHelp(); |
| 58 | return 0; |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | IncParser inc = null; |
| 63 | |
| 64 | if (file == null) |
| 65 | { |
| 66 | DirectoryInfo di = new DirectoryInfo(directory); |
| 67 | FileInfo[] rgFiles = di.GetFiles("*.inc"); |
| 68 | |
| 69 | ParseWriter pwr = new ParseWriter(); |
| 70 | |
| 71 | foreach (FileInfo fi in rgFiles) |
| 72 | { |
nothing calls this directly
no test coverage detected