private List <string> GetRows() { try { var formID = new Guid(Request.QueryString["formID"]); var seq = int.Parse(Request.QueryString["Seq"]); var manager = new SECFormsDocAnalyzer(); if (Request.QueryString["proximity"] == "on") { var term1 = Request.QueryString["proximityTerm1"]; var term2 = Request.QueryString["proximityTerm2"]; var proximityRange = int.Parse(Request.QueryString["proximityRange"]); var additionalRange = int.Parse(Request.QueryString["additionalRange"]); var paragraphs1 = manager.GetFormSubDocParagraphsWithProximity(formID, seq, proximityRange, term1, term2, additionalRange, true); return(paragraphs1); } if (Request.QueryString["search"] == "on") { var term1 = Request.QueryString["proximityTerm1"]; var additionalRange = int.Parse(Request.QueryString["additionalRange"]); var paragraphs1 = manager.GetFormSubDocParagraphsWithSearch(formID, seq, term1, additionalRange, true); return(paragraphs1); } var paragraphs = manager.GetFormSubDocParagraphs(formID, seq); return(paragraphs); } catch (Exception ex) { var paragraphs = new List <string> { "No document or invalid parameters", ex.Message, ex.ToString() }; return(paragraphs); } }
[Test] public void TestGetParagraphs() { var analyzer = new SECFormsDocAnalyzer(); var doc = analyzer.GetFormSubDocParagraphs(new Guid("08AA514B-BDF2-4DBA-B9F2-0139C3CA5512"), 0); foreach (var par in doc) { Console.WriteLine(par); } }