Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Datatype_yearMonthDuration.cs
Go to the documentation of this file.
1namespace System.Xml.Schema;
2
4{
5 public override XmlTypeCode TypeCode => XmlTypeCode.YearMonthDuration;
6
7 internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
8 {
9 typedValue = null;
10 if (s == null || s.Length == 0)
11 {
12 return new XmlSchemaException(System.SR.Sch_EmptyAttributeValue, string.Empty);
13 }
15 if (ex == null)
16 {
17 ex = XsdDuration.TryParse(s, XsdDuration.DurationType.YearMonthDuration, out var result);
18 if (ex == null)
19 {
20 ex = result.TryToTimeSpan(XsdDuration.DurationType.YearMonthDuration, out var result2);
21 if (ex == null)
22 {
24 if (ex == null)
25 {
26 typedValue = result2;
27 return null;
28 }
29 }
30 }
31 }
32 return ex;
33 }
34}
static string Sch_EmptyAttributeValue
Definition SR.cs:570
Definition SR.cs:7
override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
TypeCode
Definition TypeCode.cs:4
static Exception TryParse(string s, out XsdDuration result)