internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
{
Exception exception;
typedValue = null;
if (s == null || s.Length == 0)
{
return new XmlSchemaException(SR.Sch_EmptyAttributeValue, string.Empty);
}
exception = durationFacetsChecker.CheckLexicalFacets(ref s, this);
if (exception != null) goto Error;
TimeSpan timeSpanValue;
exception = XmlConvert.TryToTimeSpan(s, out timeSpanValue);
if (exception != null) goto Error;
exception = durationFacetsChecker.CheckValueFacets(timeSpanValue, this);
if (exception != null) goto Error;
typedValue = timeSpanValue;
return null;
Error:
return exception;
}
}