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

◆ XmlEncodedRawTextWriter() [3/3]

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

Definition at line 129 of file XmlEncodedRawTextWriter.cs.

130 : this(settings)
131 {
132 _stream = stream;
133 _encoding = settings.Encoding;
134 if (settings.Async)
135 {
136 _bufLen = 65536;
137 }
138 _bufChars = new char[_bufLen + 32];
139 _bufBytes = new byte[_bufChars.Length];
140 _bufBytesUsed = 0;
141 _trackTextContent = true;
142 _inTextContent = false;
143 _lastMarkPos = 0;
144 _textContentMarks = new int[64];
145 _textContentMarks[0] = 1;
146 _charEntityFallback = new CharEntityEncoderFallback();
147 ReadOnlySpan<byte> preamble = _encoding.Preamble;
148 _encoding = (Encoding)settings.Encoding.Clone();
151 if ((!stream.CanSeek || stream.Position == 0L) && preamble.Length != 0)
152 {
154 }
155 if (settings.AutoXmlDeclaration)
156 {
158 _autoXmlDeclaration = true;
159 }
160 }
void Write(byte[] buffer, int offset, int count)
virtual ReadOnlySpan< byte > Preamble
Definition Encoding.cs:347
virtual Encoder GetEncoder()
Definition Encoding.cs:1009
readonly CharEntityEncoderFallback _charEntityFallback
override void WriteXmlDeclaration(XmlStandalone standalone)

References System.Xml.XmlEncodedRawTextWriter._autoXmlDeclaration, System.Xml.XmlEncodedRawTextWriter._bufBytes, System.Xml.XmlEncodedRawTextWriter._bufBytesUsed, System.Xml.XmlEncodedRawTextWriter._bufChars, System.Xml.XmlEncodedRawTextWriter._bufLen, System.Xml.XmlEncodedRawTextWriter._charEntityFallback, System.Xml.XmlEncodedRawTextWriter._encoder, System.Xml.XmlEncodedRawTextWriter._encoding, System.Xml.XmlEncodedRawTextWriter._inTextContent, System.Xml.XmlEncodedRawTextWriter._lastMarkPos, System.Xml.XmlEncodedRawTextWriter._standalone, System.Xml.XmlEncodedRawTextWriter._stream, System.Xml.XmlEncodedRawTextWriter._textContentMarks, System.Xml.XmlEncodedRawTextWriter._trackTextContent, System.Xml.XmlWriterSettings.Async, System.Xml.XmlWriterSettings.AutoXmlDeclaration, System.Text.Encoding.Clone(), System.Xml.Dictionary, System.Xml.Encoding, System.Xml.XmlWriterSettings.Encoding, System.Text.Encoding.GetEncoder(), System.Xml.L, System.Text.Encoding.Preamble, System.stream, System.IO.Stream.Write(), and System.Xml.XmlEncodedRawTextWriter.WriteXmlDeclaration().