Esempio n. 1
0
		public IResultSet Process(string expression)
		{
            WsScanRules rules = new WsScanRules();
            rules.Add(new WsScanRule("Find", "FindIndex", expression, RuleLevels.High));
			WsDocumentScanner scanner = new WsDocumentScanner(m_filename, rules);
			return scanner.Match();
		}
		private long ScannerHelper(string testFilename, string token)
		{
            WsScanRules scanRules = new WsScanRules();
            scanRules.Add(new WsScanRule("Find", "FindIndex", token, RuleLevels.High));
            
			WsDocumentScanner documentScanner = new WsDocumentScanner(testFilename, scanRules);
			return documentScanner.Match().TotalMatchCount;
		}
Esempio n. 3
0
		public IResultSet Process(string expression, params RangeTypes[] types)
		{
            WsScanRules rules = new WsScanRules();
            WsScanRule rule = new WsScanRule("Find", "FindIndex", expression, RuleLevels.High);
            
            foreach(RangeTypes type in types)
                rule.Ranges.Add(type);

            rules.Add(rule);

            WsDocumentScanner scanner = new WsDocumentScanner(m_filename, rules);			
			return scanner.Match();
		}