private void Handle(DirectoryToSearchMessage message)
 {
     IncrementMessagesReceived();
     fileCount = 0;
     m_sw.Start();
     EnumerateFiles(Sender, message.Directory, message.SearchPattern);
     m_sw.Stop();
     Sender.Tell(new DoneEnumeratingFiles(fileCount, m_sw.Elapsed));
     m_sw.Reset();
     Context.Stop(Self);
 }
 public void Handle(DirectoryToSearchMessage message)
 {
     IncrementMessagesReceived();
     fileno = 0;
     fileProcessed = 0;
     filesCrawled = 0;
     CrawlingDone = false;
     _textToSearch = message.TextToSearch;
     m_sw.Start();
     //router = Context.ActorOf(new RoundRobinPool(8).Props(DocumentActor.GetProps()),
     //   String.Format("File{0}", fileno));
     var EnumeratorActor = Context.ActorOf(FileEnumeratorActor.GetProps());
     EnumeratorActor.Tell(message);
 }