示例#1
0
        public DocumentEventsTracker(_DTE dte,
                                     IDocumentHistoryManager documentHistoryManager,
                                     IHistoryRepositoryFactory historyRepositoryFactory,
                                     IMessageBox messageBox)
        {
            _dte            = dte ?? throw new ArgumentNullException(nameof(dte));
            _solutionEvents = _dte.Events.SolutionEvents;
            _documentEvents = _dte.Events.DocumentEvents;

            _documentHistoryManager   = documentHistoryManager ?? throw new ArgumentNullException(nameof(documentHistoryManager));
            _historyRepositoryFactory = historyRepositoryFactory ?? throw new ArgumentNullException(nameof(historyRepositoryFactory));
            _messageBox = messageBox ?? throw new ArgumentNullException(nameof(messageBox));

            Initialize();
        }