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

XmlUtf8RawTextWriter() public méthode

public XmlUtf8RawTextWriter ( Stream stream, Encoding encoding, XmlWriterSettings settings, bool closeOutput ) : System
stream Stream
encoding Encoding
settings XmlWriterSettings
closeOutput bool
Résultat System
        public XmlUtf8RawTextWriter( Stream stream, Encoding encoding, XmlWriterSettings settings, bool closeOutput ) : this( settings, closeOutput ) {
            Debug.Assert( stream != null && settings != null );

            this.stream = stream;
            this.encoding = encoding;


            // the buffer is allocated will OVERFLOW in order to reduce checks when writing out constant size markup
            bufBytes = new byte[ BUFSIZE + OVERFLOW ];

            // Output UTF-8 byte order mark if Encoding object wants it
            if ( !stream.CanSeek || stream.Position == 0 ) {
                byte[] bom = encoding.GetPreamble();
                if ( bom.Length != 0 ) {
                    Buffer.BlockCopy( bom, 0, bufBytes, 1, bom.Length );
                    bufPos += bom.Length;
                    textPos += bom.Length;
                }
            }




























            // Write the xml declaration
            if ( settings.AutoXmlDeclaration ) {
                WriteXmlDeclaration( standalone );
                autoXmlDeclaration = true;
            }
        }

Same methods

XmlUtf8RawTextWriter::XmlUtf8RawTextWriter ( XmlWriterSettings settings, bool closeOutput ) : System