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

◆ ReadElementContentAsAsync()

override async Task< object > System.Xml.XsdValidatingReader.ReadElementContentAsAsync ( Type returnType,
IXmlNamespaceResolver namespaceResolver )
inlinevirtual

Reimplemented from System.Xml.XmlReader.

Definition at line 2230 of file XsdValidatingReader.cs.

2231 {
2232 if (NodeType != XmlNodeType.Element)
2233 {
2234 throw CreateReadElementContentAsException("ReadElementContentAs");
2235 }
2237 try
2238 {
2239 if (xmlSchemaType != null)
2240 {
2241 if (returnType == typeof(DateTimeOffset) && xmlSchemaType.Datatype is Datatype_dateTimeBase)
2242 {
2243 value = text;
2244 }
2245 return xmlSchemaType.ValueConverter.ChangeType(value, returnType, namespaceResolver);
2246 }
2248 }
2249 catch (FormatException innerException)
2250 {
2252 }
2253 catch (InvalidCastException innerException2)
2254 {
2256 }
2257 catch (OverflowException innerException3)
2258 {
2260 }
2261 }
static string Xml_ReadContentAsFormatException
Definition SR.cs:190
Definition SR.cs:7
static readonly XmlValueConverter Untyped
Exception CreateReadElementContentAsException(string methodName)
async Task<(XmlSchemaType, string, object)> InternalReadElementContentAsObjectTupleAsync(bool unwrapTypedValue)

References System.Xml.XmlReader.CreateReadElementContentAsException(), System.Xml.Dictionary, System.Xml.XsdValidatingReader.InternalReadElementContentAsObjectTupleAsync(), System.Xml.XsdValidatingReader.NodeType, System.text, System.Xml.Schema.XmlUntypedConverter.Untyped, System.value, System.SR.Xml_ReadContentAsFormatException, and System.Xml.XmlException.