39 references to DurationType
System.Private.Xml (39)
System\Xml\Schema\DataTypeImplementation.cs (4)
1920exception = XsdDuration.TryParse(s, XsdDuration.DurationType.YearMonthDuration, out duration); 1925exception = duration.TryToTimeSpan(XsdDuration.DurationType.YearMonthDuration, out timeSpanValue); 1959exception = XsdDuration.TryParse(s, XsdDuration.DurationType.DayTimeDuration, out duration); 1963exception = duration.TryToTimeSpan(XsdDuration.DurationType.DayTimeDuration, out timeSpanValue);
System\Xml\Schema\XmlValueConverter.cs (12)
540return new XsdDuration(value, XsdDuration.DurationType.DayTimeDuration).ToTimeSpan(XsdDuration.DurationType.DayTimeDuration); 545return new XsdDuration(value, XsdDuration.DurationType.Duration).ToTimeSpan(XsdDuration.DurationType.Duration); 663return new XsdDuration(value, XsdDuration.DurationType.YearMonthDuration).ToTimeSpan(XsdDuration.DurationType.YearMonthDuration); 693return new XsdDuration(value, XsdDuration.DurationType.DayTimeDuration).ToString(XsdDuration.DurationType.DayTimeDuration); 698return new XsdDuration(value, XsdDuration.DurationType.Duration).ToString(XsdDuration.DurationType.Duration); 787return new XsdDuration(value, XsdDuration.DurationType.YearMonthDuration).ToString(XsdDuration.DurationType.YearMonthDuration);
System\Xml\Schema\XsdDuration.cs (23)
75public XsdDuration(TimeSpan timeSpan) : this(timeSpan, DurationType.Duration) 83public XsdDuration(TimeSpan timeSpan, DurationType durationType) 101if (durationType == DurationType.YearMonthDuration) 117Debug.Assert(durationType == DurationType.Duration || durationType == DurationType.DayTimeDuration); 137public XsdDuration(string s) : this(s, DurationType.Duration) 145public XsdDuration(string s, DurationType durationType) 239return ToTimeSpan(DurationType.Duration); 246public TimeSpan ToTimeSpan(DurationType durationType) 260return TryToTimeSpan(DurationType.Duration, out result); 263internal Exception? TryToTimeSpan(DurationType durationType, out TimeSpan result) 274if (durationType != DurationType.DayTimeDuration) 281if (durationType != DurationType.YearMonthDuration) 336return ToString(DurationType.Duration); 343internal string ToString(DurationType durationType) 352public bool TryFormat(Span<char> destination, out int charsWritten, DurationType durationType = DurationType.Duration) 362if (durationType != DurationType.DayTimeDuration) 377if (durationType != DurationType.YearMonthDuration) 449return TryParse(s, DurationType.Duration, out result); 452internal static Exception? TryParse(string s, DurationType durationType, out XsdDuration result) 615if (durationType == DurationType.DayTimeDuration) 620else if (durationType == DurationType.YearMonthDuration)