Example #1
0
 public FileSearcher(FileSearcherOptions options, IFileTreeView fileTreeView, IDotNetImageManager dotNetImageManager, 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();
     this.cancellationTokenSource = new CancellationTokenSource();
     this.cancellationToken       = cancellationTokenSource.Token;
     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.cancellationToken,
         SearchDecompiledData = options.SearchDecompiledData,
     };
 }
Example #2
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,
			};
		}
Example #3
0
 public FilterSearcher(FilterSearcherOptions options)
 {
     this.options = options;
 }
Example #4
0
 public FilterSearcher(FilterSearcherOptions options)
 {
     this.options = options;
 }