/// <summary> /// Handler for processed command-line parameters /// </summary> /// <param name="commandLineParser">The command line parser used</param> protected override void CommandLineParsed(CommandLineParser commandLineParser) { base.CommandLineParsed(commandLineParser); if (commandLineParser.PositionalArguments.Count != 2) { ArgumentError(""); } inputFilename = commandLineParser.PositionalArguments[0]; outputFilename = commandLineParser.PositionalArguments[1]; quiet = paramQuiet.Present; if (paramFormat.Occurrences != 0) { switch (paramFormat.Arguments[0].ToUpperInvariant()) { case "TEXT": case "TXT": selectedOutputFormat = OutputFormat.Text; break; case "HTML": selectedOutputFormat = OutputFormat.Html; break; default: throw new CommandLineParameterException("Unsupported output format"); } } else { selectedOutputFormat = OutputFormat.Text; } fromDate = paramFrom.Occurrences == 0 ? DateTime.MinValue : paramFrom.ArgumentValue; toDate = paramTo.Occurrences == 0 ? DateTime.MaxValue : paramTo.ArgumentValue; int wrapLimit = paramWrap.Occurrences == 0 ? Int32.MaxValue : paramWrap.ArgumentValue; textPreprocessor = new TextPreprocessor(wrapLimit); }
public void Setup() { textPreprocessor = new TextPreprocessor(1); }