private static void Main(string[] args) { var commandLineArgs = new CommandLineArguments(args); var inputFileName = commandLineArgs.GetKeyValue("pdf"); if (inputFileName == null) { ShowHelp(); return; } var output = ReadPdfFile(inputFileName); debugVerbose = commandLineArgs.HasArg("debugVerbose"); debugWholeOptions = commandLineArgs.HasArg("debugWholeOptions"); debugIndividualOptions = commandLineArgs.HasArg("debugIndividualOptions"); justText = commandLineArgs.HasArg("justText"); var outputFileName = commandLineArgs.GetKeyValue("out") ?? "Output.xml"; StreamWriter outFile = new StreamWriter(outputFileName); if (justText) { outFile.Write(output); } else { outFile.WriteLine("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); units = new Units(); options = new Options(); ignoreLines = new IgnoreLines(); sections = new Sections(); ammoTypes = new AmmoTypes(); var lines = output.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); foreach (var line in lines) { if (debugVerbose) { outFile.WriteLine("<line>" + line + "</line>"); } else { DealWithLine(line, outFile); } } CloseTag(outFile, true, true, true); outFile.WriteLine("</army-list>"); } outFile.Close(); }
new CSVReaderPipe( IgnoreLines: IgnoreLines, Seperators: Seperators, StringSplitOptions: StringSplitOptions, ExpectedNumberOfColumns: ExpectedNumberOfColumns, FailOnWrongNumberOfColumns: FailOnWrongNumberOfColumns)
new CSVReaderPipe(IgnoreLines, Seperators, StringSplitOptions, ExpectedNumberOfColumns, FailOnWrongNumberOfColumns, false, null, null)