Esempio n. 1
0
        private void HandleBaseOptions(BaseOptions baseOptions, WriteLine writer, IModeParser specifiedMode = null)
        {
            if (baseOptions.ShowHelp)
            {
                ShowHelp(writer, specifiedMode);
            }

            if (baseOptions.ShowVersion)
            {
                ShowVersion(writer);
            }
        }
Esempio n. 2
0
        public void ShowHelp(WriteLine writeLine, IModeParser specifiedMode = null)
        {
            writeLine($"Canvas {GetVersion()} {GetCopyright()}");
            writeLine(" ");
            string modeName = specifiedMode?.Name ?? "[MODE]";

            if (specifiedMode != null)
            {
                writeLine($"{specifiedMode.Name} - {specifiedMode.Description}");
                writeLine(" ");
            }
            writeLine($"Usage: Canvas.exe {modeName} [OPTIONS]+");
            writeLine(" ");
            if (specifiedMode == null)
            {
                writeLine("Available modes:");
                foreach (var mode in _modeParsers.Values)
                {
                    writeLine($"\t{mode.Name} - {mode.Description}");
                }
                writeLine(" ");
                writeLine("Options:");
                BaseOptionsParser.ShowHelp(writeLine);
            }
            else
            {
                writeLine("Mode-specific options:");
                specifiedMode.ShowHelp(writeLine);
                writeLine(" ");
                writeLine("Common options:");
                CommonOptionsParser.ShowHelp(writeLine);
                writeLine(" ");
                writeLine("Other options:");
                BaseOptionsParser.ShowHelp(writeLine);
            }
        }
Esempio n. 3
0
 private static MainParser GetMainParser(IModeParser germlineWgsModeParser)
 {
     return(new MainParser(Version, Copyright, germlineWgsModeParser));
 }