Ejemplo n.º 1
0
        protected override void ConfigureOptions(OptionsFactory options)
        {
            options.Check("Just a check that does nothing")
            .Choice("Choice 1", "1", () => {})
            .Choice("Choice 2", "2", () => {})
            .Choice("Choice 3", "3", () => {});

            options.List("Just a list that does nothing")
            .Choice("Choice 1", "1")
            .Choice("Choice 2", "2");

            options.Input("Welcome to Hello World generator. Please enter the name: ", s => _name = s);
        }
Ejemplo n.º 2
0
        protected override void ConfigureOptions(OptionsFactory options)
        {
            options.Input("Welcome to new Tempest Template generator! \n" +
                          "Please enter the name of your Generator",
                          s => _options.GeneratorName = s);

            options.List("Self-hosted or Library?")
            .Choice("Self-hosted", "selfhosted", () => _options.SelfHosted = true)
            .Choice("Library", "library");

            options
            .List("Would you like to include a build script?")
            .Choice("Sure!", "build", () => _options.IncludeBuildScript = true)
            .Choice("I'll pass", "nobuild", () => { });

            options
            .Check("What build script would you like?")
            .When(() => _options.IncludeBuildScript)
            .Choice("I'll have me some AppVeyor!", "appveyor",
                    () => _options.BuildScriptTypes = _options.BuildScriptTypes | BuildScriptTypes.AppVeyor);
        }
Ejemplo n.º 3
0
 protected override void ConfigureOptions(OptionsFactory options)
 {
     options.Check("Foo or bar?")
     .Choice("Foo", "foo", () => _foo = true)
     .Choice("Bar", "bar", () => _bar = true);
 }