public void GoSearch(PCDir dir) { dir.FileNames.ToList().ForEach(s => { var actor = Context.ActorOf<FileScanner>(); SeatchObj so = new SeatchObj(); so.Path = s; so.SearchStr = dir.SearchText; actor.Tell(so, Self); }); }
private void ScanForText(SeatchObj search) { //System.IO.FileStream fs = new System.IO.FileStream(search.Path, System.IO.FileMode.Open); string allText = System.IO.File.ReadAllText(search.Path); if (allText.Contains(search.SearchStr)) { //search.OnResultFound(search.Path); Sender.Tell(search.Path, Self); } else Sender.Tell(string.Empty, Self); }