Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XmlStringConverter.cs
Go to the documentation of this file.
1namespace System.Xml.Schema;
2
3internal sealed class XmlStringConverter : XmlBaseConverter
4{
5 private XmlStringConverter(XmlSchemaType schemaType)
6 : base(schemaType)
7 {
8 }
9
10 public static XmlValueConverter Create(XmlSchemaType schemaType)
11 {
12 return new XmlStringConverter(schemaType);
13 }
14
15 public override string ToString(object value, IXmlNamespaceResolver nsResolver)
16 {
17 if (value == null)
18 {
19 throw new ArgumentNullException("value");
20 }
23 {
24 return (string)value;
25 }
27 {
28 return ((XmlAtomicValue)value).Value;
29 }
31 }
32
34 {
35 if (value == null)
36 {
37 throw new ArgumentNullException("value");
38 }
39 if (destinationType == null)
40 {
41 throw new ArgumentNullException("destinationType");
42 }
44 {
45 destinationType = base.DefaultClrType;
46 }
48 {
49 return value;
50 }
52 {
53 return new XmlAtomicValue(base.SchemaType, value);
54 }
56 {
57 return new XmlAtomicValue(base.SchemaType, value);
58 }
60 }
61
63 {
64 if (value == null)
65 {
66 throw new ArgumentNullException("value");
67 }
68 if (destinationType == null)
69 {
70 throw new ArgumentNullException("destinationType");
71 }
74 {
75 destinationType = base.DefaultClrType;
76 }
78 {
79 return ToString(value, nsResolver);
80 }
82 {
84 {
85 return new XmlAtomicValue(base.SchemaType, (string)value);
86 }
88 {
89 return (XmlAtomicValue)value;
90 }
91 }
93 {
95 {
96 return new XmlAtomicValue(base.SchemaType, (string)value);
97 }
99 {
100 return (XmlAtomicValue)value;
101 }
102 }
104 }
105}
static ? Type GetType(string typeName, bool throwOnError, bool ignoreCase)
Definition Type.cs:408
static readonly Type XmlAtomicValueType
virtual object ChangeListType(object value, Type destinationType, IXmlNamespaceResolver nsResolver)
override string ToString(object value, IXmlNamespaceResolver nsResolver)
static XmlValueConverter Create(XmlSchemaType schemaType)
override object ChangeType(string value, Type destinationType, IXmlNamespaceResolver nsResolver)
XmlStringConverter(XmlSchemaType schemaType)
override object ChangeType(object value, Type destinationType, IXmlNamespaceResolver nsResolver)