コード例 #1
0
        private static OptionGroup CreateGroupWithOption(out FakeOption versionOption, out FakeOption statusOption)
        {
            versionOption = new FakeOption("version");
            statusOption  = new FakeOption("status");
            var optionGroup = new OptionGroup("inspec")
                              .WithOption(versionOption, "version")
                              .WithOption(statusOption, "status");

            return(optionGroup);
        }
コード例 #2
0
        private OptionGroup CreateChefRunOption(out FakeOption chefRunOption, out FakeOption chefVersionOption)
        {
            chefRunOption     = new FakeOption("run chef");
            chefVersionOption = new FakeOption("shows chef version");
            var chefRunOptionCopy     = chefRunOption;
            var chefVersionOptionCopy = chefVersionOption;

            return(new OptionGroup()
                   .WithGroup("chef", chefGroup =>
            {
                chefGroup.WithOption(chefRunOptionCopy, "run");
                chefGroup.WithOption(chefVersionOptionCopy, "version");
            }));
        }