Exemplo n.º 1
0
        public IRepoActionSettings Build()
        {
            var options  = new OptionSet();
            var settings = new GraphSettings(options);

            settings.Parse(_args);

            if (_help && !_trueCounter.Any(settings.Compile, settings.Export))
            {
                return(new ShowHelpSettings("Graph Options", options));
            }

            _validator.Validate(settings).ThrowIfAny(options);

            var subBuilder = _builderSelector.GetBuilder(settings);

            subBuilder.SetArgs(_args);
            subBuilder.SetHelp(_help);

            return(subBuilder.Build());
        }
Exemplo n.º 2
0
        public IRepoActionSettings Build()
        {
            var options  = new OptionSet();
            var settings = new RepoActionSettings(options);

            settings.Parse(_args);

            SetHelp(settings.Help);

            if (_help && !settings.ActionSpecified)
            {
                return(new ShowHelpSettings("Repographer Options", options));
            }

            _validator.Validate(settings).ThrowIfAny(options);

            var subBuilder = _builderSelector.GetBuilder(settings);

            subBuilder.SetHelp(_help);
            subBuilder.SetArgs(_args);

            return(subBuilder.Build());
        }