System.Xml.XmlUtf8RawTextWriter.WriteNamespaceDeclaration C# (CSharp) Méthode

WriteNamespaceDeclaration() private méthode

private WriteNamespaceDeclaration ( string prefix, string namespaceName ) : void
prefix string
namespaceName string
Résultat void
        internal override void WriteNamespaceDeclaration( string prefix, string namespaceName ) {
            Debug.Assert( prefix != null && namespaceName != null );

            

            if ( prefix.Length == 0 ) {
                RawText( " xmlns=\"" );
            }
            else {
                RawText( " xmlns:" );
                RawText( prefix );
                bufBytes[bufPos++] = (byte)'=';
                bufBytes[bufPos++] = (byte)'"';
            }

            inAttributeValue = true;
            
            WriteString( namespaceName );
            
            inAttributeValue = false;

            bufBytes[bufPos++] = (byte)'"';
            attrEndPos = bufPos;
        }