Пример #1
0
 public static SearchResult CreateMessage(SearchResultContext context, string msg, TextTokenKind type, bool first)
 {
     return(new MessageSearchResult(msg, type, first)
     {
         Context = context
     });
 }
Пример #2
0
		public IFileSearcher Create(FileSearcherOptions options) {
			var searchResultContext = new SearchResultContext {
				SyntaxHighlight = true,
				Language = languageManager.Language,
				ImageManager = imageManager,
				BackgroundType = BackgroundType.Search,
			};
			return new FileSearcher(options, fileTreeView, dotNetImageManager, searchResultContext);
		}
Пример #3
0
        public IFileSearcher Create(FileSearcherOptions options)
        {
            var searchResultContext = new SearchResultContext {
                SyntaxHighlight = true,
                Decompiler      = decompilerManager.Decompiler,
                ImageManager    = imageManager,
                BackgroundType  = BackgroundType.Search,
            };

            return(new FileSearcher(options, fileTreeView, dotNetImageManager, searchResultContext));
        }
Пример #4
0
		public IDocumentSearcher Create(DocumentSearcherOptions options, IDocumentTreeView documentTreeView) {
			if (options == null)
				throw new ArgumentNullException(nameof(options));
			if (documentTreeView == null)
				throw new ArgumentNullException(nameof(documentTreeView));
			var searchResultContext = new SearchResultContext(classificationFormatMap, textElementProvider) {
				SyntaxHighlight = true,
				Decompiler = decompilerService.Decompiler,
			};
			return new DocumentSearcher(options, documentTreeView, dotNetImageService, searchResultContext);
		}
Пример #5
0
        public IDocumentSearcher Create(DocumentSearcherOptions options, IDocumentTreeView documentTreeView)
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }
            if (documentTreeView == null)
            {
                throw new ArgumentNullException(nameof(documentTreeView));
            }
            var searchResultContext = new SearchResultContext {
                SyntaxHighlight = true,
                Decompiler      = decompilerService.Decompiler,
            };

            return(new DocumentSearcher(options, documentTreeView, dotNetImageService, searchResultContext));
        }
Пример #6
0
        public IDocumentSearcher Create(DocumentSearcherOptions options, IDocumentTreeView documentTreeView)
        {
            if (options is null)
            {
                throw new ArgumentNullException(nameof(options));
            }
            if (documentTreeView is null)
            {
                throw new ArgumentNullException(nameof(documentTreeView));
            }
            var searchResultContext = new SearchResultContext(classificationFormatMap, textElementProvider, decompilerService.Decompiler)
            {
                SyntaxHighlight = true,
            };

            return(new DocumentSearcher(options, documentTreeView, dotNetImageService, searchResultContext));
        }
Пример #7
0
		public FileSearcher(FileSearcherOptions options, IFileTreeView fileTreeView, DotNetImageManager dotNetImageManager, SearchResultContext searchResultContext) {
			if (options.Filter == null)
				throw new ArgumentException("options.Filter is null", "options");
			if (options.SearchComparer == null)
				throw new ArgumentException("options.SearchComparer is null", "options");
			this.options = options.Clone();
			this.cancellationTokenSource = new CancellationTokenSource();
			this.filterSearcherOptions = new FilterSearcherOptions {
				Dispatcher = Dispatcher.CurrentDispatcher,
				FileTreeView = fileTreeView,
				DotNetImageManager = dotNetImageManager,
				Filter = options.Filter,
				SearchComparer = options.SearchComparer,
				OnMatch = r => AddSearchResult(r),
				Context = searchResultContext,
				CancellationToken = this.cancellationTokenSource.Token,
				SearchDecompiledData = options.SearchDecompiledData,
			};
		}
Пример #8
0
 public FileSearcher(FileSearcherOptions options, IFileTreeView fileTreeView, DotNetImageManager dotNetImageManager, SearchResultContext searchResultContext)
 {
     if (options.Filter == null)
     {
         throw new ArgumentException("options.Filter is null", "options");
     }
     if (options.SearchComparer == null)
     {
         throw new ArgumentException("options.SearchComparer is null", "options");
     }
     this.options = options.Clone();
     this.cancellationTokenSource = new CancellationTokenSource();
     this.filterSearcherOptions   = new FilterSearcherOptions {
         Dispatcher           = Dispatcher.CurrentDispatcher,
         FileTreeView         = fileTreeView,
         DotNetImageManager   = dotNetImageManager,
         Filter               = options.Filter,
         SearchComparer       = options.SearchComparer,
         OnMatch              = r => AddSearchResult(r),
         Context              = searchResultContext,
         CancellationToken    = this.cancellationTokenSource.Token,
         SearchDecompiledData = options.SearchDecompiledData,
     };
 }
Пример #9
0
 public static SearchResult CreateMessage(SearchResultContext context, string msg, object color, bool first) =>
 new MessageSearchResult(msg, color, first)
 {
     Context = context
 };
Пример #10
0
 public DocumentSearcher(DocumentSearcherOptions options, IDocumentTreeView documentTreeView, IDotNetImageService dotNetImageService, SearchResultContext searchResultContext)
 {
     if (options.Filter == null)
     {
         throw new ArgumentException("options.Filter is null", nameof(options));
     }
     if (options.SearchComparer == null)
     {
         throw new ArgumentException("options.SearchComparer is null", nameof(options));
     }
     this.options            = options.Clone();
     cancellationTokenSource = new CancellationTokenSource();
     cancellationToken       = cancellationTokenSource.Token;
     filterSearcherOptions   = new FilterSearcherOptions {
         Dispatcher           = Dispatcher.CurrentDispatcher,
         DocumentTreeView     = documentTreeView,
         DotNetImageService   = dotNetImageService,
         Filter               = options.Filter,
         SearchComparer       = options.SearchComparer,
         OnMatch              = r => AddSearchResult(r),
         Context              = searchResultContext,
         CancellationToken    = cancellationToken,
         SearchDecompiledData = options.SearchDecompiledData,
     };
 }