Example #1
0
        /// <summary>
        /// Populates this instance with the sequence of elements
        /// </summary>
        ///
        /// <param name="elements">
        /// The elements that are the source for the new document.
        /// </param>

        protected void Populate(IEnumerable <IDomObject> elements)
        {
            foreach (var item in elements)
            {
                ChildNodesInternal.AddAlways(item);
            }
        }
Example #2
0
        /// <summary>
        /// Constructor that populates the container with the passed elements.
        /// </summary>
        ///
        /// <param name="elements">
        /// The elements.
        /// </param>

        public DomContainer(IEnumerable <IDomObject> elements) : base()
        {
            ChildNodesInternal.AddRange(elements);
        }
Example #3
0
        /// <summary>
        /// Appends a child without checking if it already exists. This should only be used during DOM
        /// construction.
        /// </summary>
        ///
        /// <param name="item">
        /// The element to append.
        /// </param>

        public override void AppendChildUnsafe(IDomObject item)
        {
            ChildNodesInternal.AddAlways(item);
        }