/// <summary> /// Parse command line arguments for Merge command /// </summary> /// <param name="args">Array of command line arguments.</param> private static void MergeOption(string[] args) { Merge options = new Merge(); CommandLineArguments parser = new CommandLineArguments(); //Add the parameters parser.Parameter(ArgumentType.Optional, "SortByReadName", ArgumentValueType.Bool, "n", "Sort by read name"); parser.Parameter(ArgumentType.Optional, "HeaderFile", ArgumentValueType.String, "h", "Copy the Header from this file"); parser.Parameter(ArgumentType.Optional, "Help", ArgumentValueType.Bool, "", ""); parser.Parameter(ArgumentType.Optional, "OutputFilename", ArgumentValueType.String, "o", "Output file name"); parser.Parameter(ArgumentType.DefaultArgument, "FilePaths", ArgumentValueType.MultipleUniqueStrings, "", "File Paths"); if (args != null && args.Length >= 2) { try { parser.Parse(args, options); } catch (ArgumentParserException ex) { DisplayErrorMessage(ex.Message); DisplayErrorMessage(Resources.MergeHelp); Environment.Exit(-1); } if (options.Help) { DisplayErrorMessage(Resources.MergeHelp); } else { options.DoMerge(); } } else { DisplayErrorMessage(Resources.MergeHelp); } }