/* Copyright (C) 2014-2019 de4dot@gmail.com This file is part of dnSpy dnSpy is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. dnSpy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with dnSpy. If not, see . */ using System; using System.Collections.Generic; using dnSpy.Contracts.Decompiler; using dnSpy.Contracts.Documents; using dnSpy.Contracts.Documents.TreeView; namespace dnSpy.Contracts.Search { /// /// Searches for things in s and /// interface IDocumentSearcher { /// /// true if too many results were found and the search was canceled /// bool TooManyResults { get; } /// /// Used by . true if the result is syntax highlighted in the UI. /// must be called if this gets updated. /// bool SyntaxHighlight { get; set; } /// /// Used by . Language to use. /// must be called if this gets updated. /// IDecompiler Decompiler { get; set; } /// /// A search result that was added to indicate that it's searching. Should be removed from /// the list after the search has completed if it's not null. /// ISearchResult? SearchingResult { get; } /// /// Starts the search /// /// Files to search void Start(IEnumerable files); /// /// Starts the search /// /// Types to search void Start(IEnumerable typeInfos); /// /// Cancels the search /// void Cancel(); /// /// Raised when the search has completed or was canceled /// event EventHandler? OnSearchCompleted; /// /// Raised when there are more results available /// event EventHandler? OnNewSearchResults; } }