public HtmlElementRule(HtmlElementRule parent, string name, HtmlElementOptions flags) { Precondition.Defined(name, () => Error.ArgumentNull("name")); _name = name; _options = flags; _children = new HtmlElementRuleCollection(); _attributes = new HtmlAttributeRuleCollection(); _parent = parent; }
IFluentAttributeRule IRuleSelector.Attributes(params string[] names) { Precondition.Require(names, () => Error.ArgumentNull("names")); HtmlAttributeRuleCollection collection = new HtmlAttributeRuleCollection(); foreach (string name in names) collection.Add(new HtmlAttributeRule(this, name, HtmlAttributeOptions.Allowed)); return collection; }