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

            if (baseOptions.ShowVersion)
            {
                ShowVersion(writer);
            }
        }
Ejemplo n.º 2
0
        private bool AnyBaseOptions(string[] args, out BaseOptions baseOptionsResult)
        {
            baseOptionsResult = null;
            var result      = GetParseResults(args);
            var baseOptions = result.Get(BaseOptionsParser);

            if (!result.RemainingArgs.Any() && baseOptions.Success && AnyBaseOptions(baseOptions.Result))
            {
                baseOptionsResult = baseOptions.Result;
                return(true);
            }
            return(false);
        }
Ejemplo n.º 3
0
        private bool HandleBaseOptions(BaseOptions baseOptions, TextWriter writer, ModeParser specifiedMode = null)
        {
            if (baseOptions.ShowHelp)
            {
                ShowHelp(writer, specifiedMode);
                return(true);
            }

            if (baseOptions.ShowVersion)
            {
                ShowVersion(writer);
                return(true);
            }
            return(false);
        }
Ejemplo n.º 4
0
        private bool HandleBaseOptions(BaseOptions baseOptions, TextWriter writer, ModeParser specifiedMode = null)
        {
            if (baseOptions.ShowHelp)
            {
                ShowHelp(writer, specifiedMode);
                return true;
            }

            if (baseOptions.ShowVersion)
            {
                ShowVersion(writer);
                return true;
            }
            return false;
        }
Ejemplo n.º 5
0
 private static bool AnyBaseOptions(BaseOptions baseOptions)
 {
     return(baseOptions.ShowHelp || baseOptions.ShowVersion);
 }