Exemplo n.º 1
0
        protected override void Initialise()
        {
            Config = new CommandLineInterpreterConfiguration();
            Handlers = new Dictionary<Type, ICommandHandler>();

            foreach (var type in _commands)
            {
                Config.Load(type);
                foreach(var handler in CommandHandlerLoader.LoadHandlerMethods(type, _commands, Injector.Value))
                    Handlers[handler.CommandType] = handler;
            }
            base.Initialise();
        }
 private void Configure(CommandLineInterpreterConfiguration config)
 {
     config.Load(typeof (C1Data));
     config.Load(typeof (C2Data));
     config.Load(typeof (C3Data));
 }
 private void Configure(CommandLineInterpreterConfiguration config)
 {
     config.Load(typeof(AddCommand));
     config.Load(typeof(CloneCommand));
 }
 private void Configure(CommandLineInterpreterConfiguration config)
 {
     config.Load(typeof (ImportCommand));
     config.Load(typeof (ExportCommand));
     config.Load(typeof (HelpCommand));
 }