public void TestFind() { FindLineOptions o = new FindLineOptions("Woot", true, false); var f = new LineMatcher(o); var s = new List<Match>(f.Filter(files_in_files1)); Assert.Equal(1, s.Count); }
public Finder(FindFileOptions fileOptions, FindLineOptions lineOptions) { this.fileOptions = fileOptions; this.lineOptions = lineOptions; }
private void RunFinderAsync(FindFileOptions fileOptions, FindLineOptions lineOptions) { var finder = new Finder(fileOptions, lineOptions); finder.FileScanned += OnFinderOnFileScanned; // Do the find in the background var b = new BackgroundWorker(); b.DoWork += delegate { finder.Find(); }; b.RunWorkerCompleted += delegate { SafeInvoke(WorkerFinished); }; b.RunWorkerAsync(); }
private void RunReplace() { SavePrefsToRegistry(); SetButtonsEnabled(false); var fileOptions = new FindFileOptions( comboSearchPath.Text, Util.ParseSearchExtensions(comboSearchExtensions.Text), Util.SplitDirectoryExcludes(comboExcludeDirectories.Text)); var lineOptions = new FindLineOptions( SearchText, checkMatchCase.Checked, checkUseRegex.Checked, comboReplaceWith.Text); RunFinderAsync(fileOptions, lineOptions); }
public LineMatcher(FindLineOptions options) { this.options = options; }