コード例 #1
0
ファイル: RuleSet.cs プロジェクト: SomeZyla/TsGui
        public void LoadXml(XElement InputXml)
        {
            if (InputXml == null)
            {
                return;
            }
            foreach (XElement subx in InputXml.Elements())
            {
                IStringMatchingRule newrule = MatchingRuleFactory.GetRuleObject(subx, this._owner);
                if (newrule != null)
                {
                    this._rules.Add(newrule);
                }
            }

            XAttribute xa = InputXml.Attribute("Type");

            if (xa != null)
            {
                if (xa.Value == "AND")
                {
                    this._ruletype = AndOr.AND;
                }
            }

            this.Not = XmlHandler.GetBoolFromXAttribute(InputXml, "Not", this.Not);
        }
コード例 #2
0
ファイル: MatchingRuleLibrary.cs プロジェクト: SomeZyla/TsGui
 public void LoadXml(XElement InputXml)
 {
     if (InputXml == null)
     {
         return;
     }
     foreach (XElement subx in InputXml.Elements())
     {
         IStringMatchingRule newrule = MatchingRuleFactory.GetRootRuleObject(subx, this._owner);
         if (newrule != null)
         {
             this.Rules.Add(newrule);
         }
     }
 }