Esempio n. 1
0
 public static bool TryParseExact(string?input, string format, IFormatProvider?formatProvider, out TimeSpan result)
 {
     if (input == null || format == null)
     {
         result = default;
         return(false);
     }
     return(TimeSpanParse.TryParseExact(input, format, formatProvider, TimeSpanStyles.None, out result));
 }
Esempio n. 2
0
 public static bool TryParseExact([NotNullWhen(true)] string?input, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.TimeSpanFormat)] string?format, IFormatProvider?formatProvider, out TimeSpan result)
 {
     if (input == null || format == null)
     {
         result = default;
         return(false);
     }
     return(TimeSpanParse.TryParseExact(input, format, formatProvider, TimeSpanStyles.None, out result));
 }
Esempio n. 3
0
 public static Boolean TryParseExact(String input, String format, IFormatProvider formatProvider, out TimeSpan result)
 {
     if (input == null)
     {
         result = default(TimeSpan);
         return(false);
     }
     return(TimeSpanParse.TryParseExact(input.AsReadOnlySpan(), format, formatProvider, TimeSpanStyles.None, out result));
 }
Esempio n. 4
0
 public static Boolean TryParseExact(String input, String format, IFormatProvider formatProvider, TimeSpanStyles styles, out TimeSpan result)
 {
     ValidateStyles(styles, nameof(styles));
     if (input == null)
     {
         result = default(TimeSpan);
         return(false);
     }
     return(TimeSpanParse.TryParseExact(input.AsReadOnlySpan(), format, formatProvider, styles, out result));
 }
Esempio n. 5
0
        // TODO https://github.com/dotnet/corefx/issues/23642: Remove once corefx has been updated with new overloads.
        public static bool TryParseExact(ReadOnlySpan <char> input, string format, IFormatProvider formatProvider, TimeSpanStyles styles, out TimeSpan result)
        {
            if (format == null)
            {
                result = default;
                return(false);
            }

            return(TimeSpanParse.TryParseExact(input, format, formatProvider, styles, out result));
        }
Esempio n. 6
0
        public static bool TryParseExact(string?input, string format, IFormatProvider?formatProvider, TimeSpanStyles styles, out TimeSpan result)
        {
            ValidateStyles(styles, nameof(styles));
            if (input == null || format == null)
            {
                result = default;
                return(false);
            }

            return(TimeSpanParse.TryParseExact(input, format, formatProvider, styles, out result));
        }
Esempio n. 7
0
 public static bool TryParseExact(ReadOnlySpan <char> input, ReadOnlySpan <char> format, IFormatProvider?formatProvider, TimeSpanStyles styles, out TimeSpan result)
 {
     ValidateStyles(styles, nameof(styles));
     return(TimeSpanParse.TryParseExact(input, format, formatProvider, styles, out result));
 }
Esempio n. 8
0
 public static bool TryParseExact(ReadOnlySpan <char> input, ReadOnlySpan <char> format, IFormatProvider?formatProvider, out TimeSpan result)
 {
     return(TimeSpanParse.TryParseExact(input, format, formatProvider, TimeSpanStyles.None, out result));
 }
Esempio n. 9
0
 public static Boolean TryParseExact(String input, String format, IFormatProvider formatProvider, TimeSpanStyles styles, out TimeSpan result)
 {
     TimeSpanParse.ValidateStyles(styles, "styles");
     return(TimeSpanParse.TryParseExact(input, format, formatProvider, styles, out result));
 }
Esempio n. 10
0
 public static Boolean TryParseExact(String input, String format, IFormatProvider formatProvider, out TimeSpan result)
 {
     return(TimeSpanParse.TryParseExact(input, format, formatProvider, TimeSpanStyles.None, out result));
 }
Esempio n. 11
0
 public static bool TryParseExact(ReadOnlySpan <char> input, [StringSyntax(StringSyntaxAttribute.TimeSpanFormat)] ReadOnlySpan <char> format, IFormatProvider?formatProvider, out TimeSpan result)
 {
     return(TimeSpanParse.TryParseExact(input, format, formatProvider, TimeSpanStyles.None, out result));
 }