System.Xml.HtmlEncodedRawTextWriterIndent.WriteStartElement C# (CSharp) Méthode

WriteStartElement() public méthode

public WriteStartElement ( string prefix, string localName, string ns ) : void
prefix string
localName string
ns string
Résultat void
        public override void WriteStartElement(string prefix, string localName, string ns ) {
            Debug.Assert( localName != null && localName.Length != 0 && prefix != null && ns != null );

            if ( trackTextContent && inTextContent != false ) { ChangeTextContentMark( false ); }

            base.elementScope.Push( (byte)base.currentElementProperties );

            if ( ns.Length == 0 ) {
                Debug.Assert( prefix.Length == 0 );

                base.currentElementProperties = (ElementProperties)elementPropertySearch.FindCaseInsensitiveString( localName );

                if ( endBlockPos == base.bufPos && ( base.currentElementProperties & ElementProperties.BLOCK_WS ) != 0 ) {
                    WriteIndent();
                }
                indentLevel++;

                base.bufChars[bufPos++] = (char) '<';
            }
            else {
                base.currentElementProperties = ElementProperties.HAS_NS | ElementProperties.BLOCK_WS;

                if ( endBlockPos == base.bufPos ) {
                    WriteIndent();
                }
                indentLevel++;

                base.bufChars[base.bufPos++] = (char) '<';
                if ( prefix.Length != 0 ) {
                    base.RawText( prefix );
                    base.bufChars[base.bufPos++] = (char) ':';
                }
            }
            base.RawText( localName );
            base.attrEndPos = bufPos;
        }