public bool RuleTest(string TestString, string RuleString, string SearchType, bool CaseSensitive) { XElement xrule = new XElement("Rule", RuleString); xrule.Add(new XAttribute("Type", SearchType)); IStringMatchingRule rule = MatchingRuleFactory.GetRuleObject(xrule, new DummyLinkTarget()); return(rule.DoesMatch(TestString)); }
protected void LoadXml(XElement InputXml) { this._reprocess = XmlHandler.GetBoolFromXAttribute(InputXml, "Reprocess", this._reprocess); this._ignoreempty = XmlHandler.GetBoolFromXAttribute(InputXml, "IgnoreEmpty", this._ignoreempty); foreach (XElement xignorerule in InputXml.Elements("Ignore")) { this._ignorerules.Add(MatchingRuleFactory.GetRuleObject(xignorerule, this._linktarget)); } }