Пример #1
0
 public Program()
 {
     _textWriter = Console.Out;
     _consoleWriter = new ConsoleWriter(_textWriter);
     _commandFactory = new CommandFactory();
     _inputParser = new InputParser();
     _tweetsRepository = new TweetsRepository();
     _usersRepository = new UsersRepository();
 }
Пример #2
0
 public Program(ITweetsRepository tweetsRepository, IUsersRepository usersRepository, InputParser inputParser, CommandFactory commandFactory, TextWriter textWriter)
 {
     _tweetsRepository = tweetsRepository;
     _usersRepository = usersRepository;
     _inputParser = inputParser;
     _commandFactory = commandFactory;
     _textWriter = textWriter;
     _consoleWriter = new ConsoleWriter(_textWriter);
 }