public MessagesController(IMessageMatcherProcessor messageMatcherProcesor, IChatRepository chatRepository, ITextAnalyzerService textAnalyzerService) { _messageMatcherProcessor = messageMatcherProcesor; _chatRepository = chatRepository; _textAnalyzerService = textAnalyzerService; }
//В конструкторе контроллера происходит инъекция сервисов через их интерфейсы public TextAnalyzerController(ITextAnalyzerService textAnalyzerService) { _textAnalyzerService = textAnalyzerService; }
public TwitterAnalyzer(ITextAnalyzerService textAnalyzerService, ITwitterRepository twitterRepository) { _textAnalyzerService = textAnalyzerService; _twitterRepository = twitterRepository; }
public HomeController(ITextAnalyzerService textAnalyzer) { _textAnalyzer = textAnalyzer; }