Microsoft.Html.Core.Tree.Nodes.ElementNode.CompleteElement C# (CSharp) Method

CompleteElement() private method

Completes element. Called by tree builder when element is complete: start tag is self-closed or implicitly closed or element is closed by a well-formed end tag or by another tag that is being opened.
private CompleteElement ( ITextRange closingSequence, bool isClosed, ReadOnlyCollection children, ReadOnlyCollection startTagAtributes, ReadOnlyCollection endTagAttributes ) : void
closingSequence ITextRange
isClosed bool
children ReadOnlyCollection
startTagAtributes ReadOnlyCollection
endTagAttributes ReadOnlyCollection
return void
        internal virtual void CompleteElement(
            ITextRange closingSequence,
            bool isClosed,
            ReadOnlyCollection<ElementNode> children,
            ReadOnlyCollection<AttributeNode> startTagAtributes,
            ReadOnlyCollection<AttributeNode> endTagAttributes) {
            Debug.Assert(children != null);
            Debug.Assert(startTagAtributes != null);
            Debug.Assert(endTagAttributes != null);

            if (!StartTag.IsComplete) {
                StartTag.Complete(startTagAtributes, closingSequence, isClosed, false, false);
            } else if (EndTag != null && !EndTag.IsComplete) {
                EndTag.Complete(endTagAttributes, closingSequence, isClosed, false, false);
            }

            Children = children;
            VirtualEnd = closingSequence.End;
        }