/// <summary> /// Handles the parsing of the document /// </summary> /// <param name="document">The document Html</param> /// <param name="serverTime">Time the page was generated</param> public bool Handle(string document, DateTime serverTime) { int index = document.IndexOf(string.Format("<th width=\"140\">{0}</th>", TWWords.ReportSubject)); if (index == -1) { return(false); } document = document.Substring(index); var matches = new Dictionary <string, Group>(); if (HandleReportCore(matches, document)) { bool testEspionage = HandleReportEspionage(matches, document); bool testRest = HandleReportRest(matches, document); var options = new ReportOutputOptions(); Report report = ReportParser.ParseHtmlMatch(matches, options); VillageReportCollection.Save(report); return(true); } return(false); }