Example #1
0
 public ArgsMapper()
 {
     Introduction                   = new GeneralPageBuilder <T>(Commands, Options);
     Usage                          = new GeneralPageBuilder <T>(Commands, Options);
     ValueConverterFactory          = new ValueConverterFactory();
     OptionValidationService        = new OptionValidationService(ValueConverterFactory);
     CommandValidationService       = new CommandValidationService(Settings);
     SubcommandValidationService    = new SubcommandValidationService(Settings);
     ReflectionService              = new ReflectionService(ValueConverterFactory);
     CommandOptionValidationService = new CommandOptionValidationService(ValueConverterFactory, Settings);
 }
        internal ArgsCommandSettings(
            IArgsMapperSettings argsMapperSettings,
            ICommandOptionValidationService commandOptionValidationService,
            ICommandValidationService commandValidationService,
            ISubcommandValidationService subcommandValidationService,
            IOptionValidationService optionValidationService,
            IValueConverterFactory valueConverterFactory)
        {
            ArgsMapperSettings             = argsMapperSettings;
            CommandOptionValidationService = commandOptionValidationService;
            CommandValidationService       = commandValidationService;
            SubcommandValidationService    = subcommandValidationService;
            OptionValidationService        = optionValidationService;
            ValueConverterFactory          = valueConverterFactory;

            Options     = new List <Option>();
            Subcommands = new List <Command>();
            Usage       = new CommandPageBuilder <TCommand>(Subcommands, Options);
        }