예제 #1
0
        public App(
            Emulator emulator,
            ILogger logger,
            CommandSender commandSender,
            IInputReader input
            )
        {
            _commandChannel = Channel.CreateUnbounded <string>();
            _logChannel     = Channel.CreateUnbounded <string>();
            _inputChannel   = Channel.CreateUnbounded <string>();

            _emulator      = emulator;
            _logger        = logger;
            _input         = input;
            _commandSender = commandSender;

            _emulator.Initialize(_commandChannel.Reader, _logChannel.Writer);
            _input.Initialize(_inputChannel.Writer);
            _logger.Initialize(_logChannel.Reader);
            _commandSender.Initialize(
                _inputChannel.Reader,
                _commandChannel.Writer,
                _logChannel.Writer);
        }