static private TryParse ( string text, XsdDateTimeFlags kinds, |
||
text | string | |
kinds | XsdDateTimeFlags | |
result | ||
return | bool |
internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue) { typedValue = null; Exception exception = DatatypeImplementation.dateTimeFacetsChecker.CheckLexicalFacets(ref s, this); if (exception == null) { XsdDateTime time; if (!XsdDateTime.TryParse(s, this.dateTimeFlags, out time)) { return(new FormatException(Res.GetString("XmlConvert_BadFormat", new object[] { s, this.dateTimeFlags.ToString() }))); } DateTime minValue = DateTime.MinValue; try { minValue = (DateTime)time; } catch (ArgumentException exception2) { return(exception2); } exception = DatatypeImplementation.dateTimeFacetsChecker.CheckValueFacets(minValue, this); if (exception == null) { typedValue = minValue; return(null); } } return(exception); }