Exemple #1
0
 public static TimeSpan ParseExact(String input, String format, IFormatProvider formatProvider)
 {
     if (input == null)
     {
         ThrowHelper.ThrowArgumentNullException(ExceptionArgument.input);
     }
     return(TimeSpanParse.ParseExact(input.AsReadOnlySpan(), format, formatProvider, TimeSpanStyles.None));
 }
Exemple #2
0
 // TODO https://github.com/dotnet/corefx/issues/23642: Remove once corefx has been updated with new overloads.
 public static TimeSpan ParseExact(ReadOnlySpan <char> input, string format, IFormatProvider formatProvider, TimeSpanStyles styles)
 {
     if (format == null)
     {
         ThrowHelper.ThrowArgumentNullException(ExceptionArgument.format);
     }
     return(TimeSpanParse.ParseExact(input, format, formatProvider, styles));
 }
Exemple #3
0
 public static TimeSpan ParseExact(String input, String format, IFormatProvider formatProvider, TimeSpanStyles styles)
 {
     ValidateStyles(styles, nameof(styles));
     if (input == null)
     {
         ThrowHelper.ThrowArgumentNullException(ExceptionArgument.input);
     }
     return(TimeSpanParse.ParseExact(input.AsReadOnlySpan(), format, formatProvider, styles));
 }
Exemple #4
0
 public static TimeSpan ParseExact(string input, string format, IFormatProvider?formatProvider)
 {
     if (input == null)
     {
         ThrowHelper.ThrowArgumentNullException(ExceptionArgument.input);
     }
     if (format == null)
     {
         ThrowHelper.ThrowArgumentNullException(ExceptionArgument.format);
     }
     return(TimeSpanParse.ParseExact(input, format, formatProvider, TimeSpanStyles.None));
 }
Exemple #5
0
 public static TimeSpan ParseExact(string input, [StringSyntax(StringSyntaxAttribute.TimeSpanFormat)] string format, IFormatProvider?formatProvider, TimeSpanStyles styles)
 {
     ValidateStyles(styles, nameof(styles));
     if (input == null)
     {
         ThrowHelper.ThrowArgumentNullException(ExceptionArgument.input);
     }
     if (format == null)
     {
         ThrowHelper.ThrowArgumentNullException(ExceptionArgument.format);
     }
     return(TimeSpanParse.ParseExact(input, format, formatProvider, styles));
 }
Exemple #6
0
 public static TimeSpan ParseExact(ReadOnlySpan <char> input, ReadOnlySpan <char> format, IFormatProvider?formatProvider, TimeSpanStyles styles = TimeSpanStyles.None)
 {
     ValidateStyles(styles, nameof(styles));
     return(TimeSpanParse.ParseExact(input, format, formatProvider, styles));
 }
Exemple #7
0
 public static TimeSpan ParseExact(String input, String format, IFormatProvider formatProvider, TimeSpanStyles styles)
 {
     TimeSpanParse.ValidateStyles(styles, "styles");
     return(TimeSpanParse.ParseExact(input, format, formatProvider, styles));
 }
Exemple #8
0
 public static TimeSpan ParseExact(String input, String format, IFormatProvider formatProvider)
 {
     return(TimeSpanParse.ParseExact(input, format, formatProvider, TimeSpanStyles.None));
 }
Exemple #9
0
 public static TimeSpan ParseExact(ReadOnlySpan <char> input, [StringSyntax(StringSyntaxAttribute.TimeSpanFormat)] ReadOnlySpan <char> format, IFormatProvider?formatProvider, TimeSpanStyles styles = TimeSpanStyles.None)
 {
     ValidateStyles(styles, nameof(styles));
     return(TimeSpanParse.ParseExact(input, format, formatProvider, styles));
 }