コード例 #1
0
            public Searcher(
                Solution solution,
                IAsynchronousOperationListener asyncListener,
                INavigateToItemDisplayFactory displayFactory,
                INavigateToCallback callback,
                string searchPattern,
                bool searchCurrentDocument,
                CancellationToken cancellationToken)
            {
                _solution = solution;
                _displayFactory = displayFactory;
                _callback = callback;
                _searchPattern = searchPattern;
                _searchCurrentDocument = searchCurrentDocument;
                _cancellationToken = cancellationToken;
                _progress = new ProgressTracker(callback.ReportProgress);
                _asyncListener = asyncListener;

                if (_searchCurrentDocument)
                {
                    var documentService = _solution.Workspace.Services.GetService<IDocumentTrackingService>();
                    var activeId = documentService.GetActiveDocument();
                    _currentDocument = activeId != null ? _solution.GetDocument(activeId) : null;
                }
            }
コード例 #2
0
 public Searcher(
     Solution solution,
     IAsynchronousOperationListener asyncListener,
     ItemDisplayFactory displayFactory,
     INavigateToCallback callback,
     string searchPattern,
     CancellationToken cancellationToken)
 {
     _solution = solution;
     _displayFactory = displayFactory;
     _callback = callback;
     _searchPattern = searchPattern;
     _cancellationToken = cancellationToken;
     _progress = new ProgressTracker(callback.ReportProgress);
     _asyncListener = asyncListener;
 }
コード例 #3
0
        public FindReferencesSearchEngine(
            Solution solution,
            IImmutableSet<Document> documents,
            ImmutableArray<IReferenceFinder> finders,
            IFindReferencesProgress progress,
            CancellationToken cancellationToken)
        {
            _documents = documents;
            _solution = solution;
            _finders = finders;
            _progress = progress;
            _cancellationToken = cancellationToken;
            _dependencyGraph = solution.GetProjectDependencyGraph();

            _progressTracker = new ProgressTracker(progress.ReportProgress);
        }