public HtmlElementCollection(Interface.IHtmlContainerControl container, bool isReadOnly) { if (container == null) { throw new ArgumentNullException("htmlElement", "Must set a container for the collection"); } this.Container = container; this.ReadOnly = isReadOnly; this.elements = new List <Interface.IHtmlElement>(); }
private bool CheckLoop(Interface.IHtmlContainerControl container, Interface.IHtmlElement element) { if (container == null) { return(true); } if (object.ReferenceEquals(container, element)) { return(false); } if (container.Parent == null) { return(true); } if (container.Parent is Interface.IHtmlContainerControl) { return(this.CheckLoop(container.Parent as Interface.IHtmlContainerControl, element)); } return(true); }
public HtmlElementCollection(Interface.IHtmlContainerControl container) : this(container, false) { }