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; }
IFluentElementRule IRuleSelector.Elements(params string[] names) { Precondition.Require(names, () => Error.ArgumentNull("names")); HtmlElementRuleCollection collection = new HtmlElementRuleCollection(); foreach (string name in names) collection.Add(new HtmlElementRule(this, name, HtmlElementOptions.Allowed | HtmlElementOptions.AllowContent | HtmlElementOptions.SelfClosing)); return collection; }