Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XmlUTF8TextWriter.cs
Go to the documentation of this file.
1
using
System.IO
;
2
using
System.Text
;
3
4
namespace
System.Xml
;
5
6
internal
sealed
class
XmlUTF8TextWriter
:
XmlBaseWriter
,
IXmlTextWriterInitializer
7
{
8
private
XmlUTF8NodeWriter
_writer
;
9
10
public
void
SetOutput
(
Stream
stream
,
Encoding
encoding,
bool
ownsStream
)
11
{
12
if
(
stream
==
null
)
13
{
14
throw
new
ArgumentNullException
(
"stream"
);
15
}
16
if
(encoding ==
null
)
17
{
18
throw
new
ArgumentNullException
(
"encoding"
);
19
}
20
if
(encoding.
WebName
!=
Encoding
.
UTF8
.WebName)
21
{
22
stream
=
new
EncodingStreamWrapper
(
stream
, encoding,
emitBOM
:
true
);
23
}
24
if
(
_writer
==
null
)
25
{
26
_writer
=
new
XmlUTF8NodeWriter
();
27
}
28
_writer
.
SetOutput
(
stream
,
ownsStream
, encoding);
29
SetOutput
(
_writer
);
30
}
31
32
protected
override
XmlSigningNodeWriter
CreateSigningNodeWriter
()
33
{
34
return
new
XmlSigningNodeWriter
(
text
:
true
);
35
}
36
}
System.ArgumentNullException
Definition
ArgumentNullException.cs:10
System.IO.Stream
Definition
Stream.cs:11
System.Text.Encoding.UTF8
static Encoding UTF8
Definition
Encoding.cs:526
System.Text.Encoding.WebName
virtual string WebName
Definition
Encoding.cs:386
System.Text.Encoding
Definition
Encoding.cs:15
System.Xml.EncodingStreamWrapper
Definition
EncodingStreamWrapper.cs:8
System.Xml.XmlBaseWriter
Definition
XmlBaseWriter.cs:12
System.Xml.XmlSigningNodeWriter
Definition
XmlSigningNodeWriter.cs:7
System.Xml.XmlUTF8NodeWriter.SetOutput
new void SetOutput(Stream stream, bool ownsStream, Encoding encoding)
Definition
XmlUTF8NodeWriter.cs:82
System.Xml.XmlUTF8NodeWriter
Definition
XmlUTF8NodeWriter.cs:8
System.Xml.XmlUTF8TextWriter._writer
XmlUTF8NodeWriter _writer
Definition
XmlUTF8TextWriter.cs:8
System.Xml.XmlUTF8TextWriter.SetOutput
void SetOutput(Stream stream, Encoding encoding, bool ownsStream)
Definition
XmlUTF8TextWriter.cs:10
System.Xml.XmlUTF8TextWriter.CreateSigningNodeWriter
override XmlSigningNodeWriter CreateSigningNodeWriter()
Definition
XmlUTF8TextWriter.cs:32
System.Xml.XmlUTF8TextWriter
Definition
XmlUTF8TextWriter.cs:7
System.Xml.IXmlTextWriterInitializer
Definition
IXmlTextWriterInitializer.cs:7
System.IO
Definition
ConsoleStream.cs:3
System.Text
Definition
ConsoleEncoding.cs:1
System.Xml.ValueHandleType.Dictionary
@ Dictionary
System.Xml
Definition
BaseRegionIterator.cs:1
System.ExceptionArgument.text
@ text
System.ExceptionArgument.stream
@ stream
source
System.Private.DataContractSerialization
System.Xml
XmlUTF8TextWriter.cs
Generated by
1.10.0