Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public ListAllCommand(HumanCommandInterpreter humanCommandInterpreter, ILogger logger)
 {
     _humanCommandInterpreter = humanCommandInterpreter;
     _logger = logger;
 }
Exemplo n.º 3
0
 public ManualCommand(HumanCommandInterpreter humanCommandInterpreter, ILogger logger)
 {
     _humanCommandInterpreter = humanCommandInterpreter;
     _logger = logger;
 }