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

◆ ReadContentAsStringAsync()

override async Task< string > System.Xml.XsdValidatingReader.ReadContentAsStringAsync ( )
inlinevirtual

Reimplemented from System.Xml.XmlReader.

Definition at line 2126 of file XsdValidatingReader.cs.

2127 {
2128 if (!XmlReader.CanReadContentAs(NodeType))
2129 {
2130 throw CreateReadContentAsException("ReadContentAsString");
2131 }
2133 XmlSchemaType xmlSchemaType = ((NodeType == XmlNodeType.Attribute) ? AttributeXmlType : ElementXmlType);
2134 try
2135 {
2136 if (xmlSchemaType != null)
2137 {
2138 return xmlSchemaType.ValueConverter.ToString(obj);
2139 }
2140 return obj as string;
2141 }
2142 catch (InvalidCastException innerException)
2143 {
2145 }
2146 catch (FormatException innerException2)
2147 {
2149 }
2150 catch (OverflowException innerException3)
2151 {
2153 }
2154 }
static string Xml_ReadContentAsFormatException
Definition SR.cs:190
Definition SR.cs:7
Exception CreateReadContentAsException(string methodName)
Task< object > InternalReadContentAsObjectAsync()

References System.Xml.XsdValidatingReader.AttributeXmlType, System.Xml.XmlReader.CanReadContentAs(), System.Xml.XmlReader.CreateReadContentAsException(), System.Xml.XsdValidatingReader.ElementXmlType, System.Xml.XsdValidatingReader.InternalReadContentAsObjectAsync(), System.Xml.XsdValidatingReader.NodeType, System.obj, System.SR.Xml_ReadContentAsFormatException, and System.Xml.XmlException.