Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ XmlUtf8RawTextWriter() [2/2]

System.Xml.XmlUtf8RawTextWriter.XmlUtf8RawTextWriter ( Stream stream,
XmlWriterSettings settings )
inline

Definition at line 94 of file XmlUtf8RawTextWriter.cs.

95 : this(settings)
96 {
98 _encoding = settings.Encoding;
99 if (settings.Async)
100 {
101 _bufLen = 65536;
102 }
103 _bufBytes = new byte[_bufLen + 32];
104 if (!stream.CanSeek || stream.Position == 0L)
105 {
106 ReadOnlySpan<byte> preamble = _encoding.Preamble;
107 if (preamble.Length != 0)
108 {
109 preamble.CopyTo(new Span<byte>(_bufBytes).Slice(1));
110 _bufPos += preamble.Length;
111 _textPos += preamble.Length;
112 }
113 }
114 if (settings.AutoXmlDeclaration)
115 {
117 _autoXmlDeclaration = true;
118 }
119 }
virtual ReadOnlySpan< byte > Preamble
Definition Encoding.cs:347
override void WriteXmlDeclaration(XmlStandalone standalone)
void CopyTo(Span< T > destination)

References System.Xml.XmlUtf8RawTextWriter._autoXmlDeclaration, System.Xml.XmlUtf8RawTextWriter._bufBytes, System.Xml.XmlUtf8RawTextWriter._bufLen, System.Xml.XmlUtf8RawTextWriter._bufPos, System.Xml.XmlUtf8RawTextWriter._encoding, System.Xml.XmlUtf8RawTextWriter._standalone, System.Xml.XmlUtf8RawTextWriter._stream, System.Xml.XmlUtf8RawTextWriter._textPos, System.Xml.XmlWriterSettings.Async, System.Xml.XmlWriterSettings.AutoXmlDeclaration, System.ReadOnlySpan< T >.CopyTo(), System.Xml.Dictionary, System.Xml.XmlWriterSettings.Encoding, System.Xml.L, System.Text.Encoding.Preamble, System.stream, and System.Xml.XmlUtf8RawTextWriter.WriteXmlDeclaration().