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