public override void InstallBindings()
        {
            _unityLogger             = new UnityLogger();
            _humanCommandInterpreter = new HumanCommandInterpreter();

            _humanCommandInterpreter.RegisterCommand(new ManualCommand(_humanCommandInterpreter, _unityLogger));
            _humanCommandInterpreter.RegisterCommand(new ListAllCommand(_humanCommandInterpreter, _unityLogger));

            Container
            .Bind <ILogger>()
            .FromInstance(_unityLogger);

            Container
            .Bind <IHumanCommandInterpreter>()
            .FromInstance(_humanCommandInterpreter);

            Container
            .Bind <IHumanCommandRegistry>()
            .FromInstance(_humanCommandInterpreter);
        }
Esempio n. 2
0
 public ListAllCommand(HumanCommandInterpreter humanCommandInterpreter, ILogger logger)
 {
     _humanCommandInterpreter = humanCommandInterpreter;
     _logger = logger;
 }
Esempio n. 3
0
 public ManualCommand(HumanCommandInterpreter humanCommandInterpreter, ILogger logger)
 {
     _humanCommandInterpreter = humanCommandInterpreter;
     _logger = logger;
 }