object IXshdVisitor.VisitRuleSet(XshdRuleSet ruleSet) { _writer.WriteStartElement("RuleSet", Namespace); if (ruleSet.Name != null) { _writer.WriteAttributeString("name", ruleSet.Name); } WriteBoolAttribute("ignoreCase", ruleSet.IgnoreCase); ruleSet.AcceptElements(this); _writer.WriteEndElement(); return(null); }
public object VisitRuleSet(XshdRuleSet ruleSet) { var hrs = new HighlightingRuleSet(); RuleSets.Add(ruleSet, hrs); if (ruleSet.Name != null) { if (ruleSet.Name.Length == 0) { throw Error(ruleSet, "Name must not be the empty string"); } if (_def._ruleSetDict.ContainsKey(ruleSet.Name)) { throw Error(ruleSet, "Duplicate rule set name '" + ruleSet.Name + "'."); } _def._ruleSetDict.Add(ruleSet.Name, hrs); } ruleSet.AcceptElements(this); return(null); }