public static Either <TLeft, long> ParseToLong <TLeft>(
     this Either <TLeft, string> source,
     NumberStyles style,
     TLeft left)
 {
     return(source.FlatMap(x => LongParser.Parse <TLeft>(x, style, left)));
 }
 public static Either <TLeft, long> ParseToLong <TLeft>(
     this Either <TLeft, string> source,
     IFormatProvider provider,
     TLeft left)
 {
     return(source.FlatMap(x => LongParser.Parse <TLeft>(x, provider, left)));
 }
 public static Either <TLeft, long> ParseToLong <TLeft>(
     this string source,
     NumberStyles style,
     IFormatProvider provider,
     TLeft left)
 {
     return(LongParser.Parse <TLeft>(source, style, provider, left));
 }
Exemplo n.º 4
0
        public async Task <ClashDelayResponse> GetClashProxyDelay(string name, int timeout = 5000, string testUrl = "http://www.gstatic.com/generate_204")
        {
            string url = string.Format(API_PROXIES_DELAY, Uri.EscapeDataString(name));

            var dict = new Dictionary <string, dynamic>();

            dict.Add("timeout", Convert.ToString(timeout));
            dict.Add("url", testUrl);

            var result = await GetAsync <ClashDelayResponse>(url, dict);

            result.DelayLong = LongParser.Parse(result.Delay);
            return(result);
        }
Exemplo n.º 5
0
 public static Maybe <long> ParseToLong(this string source)
 {
     return(LongParser.Parse(source));
 }
Exemplo n.º 6
0
 public static Maybe <long> ParseToLong(this Maybe <string> source, NumberStyles style, IFormatProvider provider)
 {
     return(source.FlatMap(x => LongParser.Parse(x, style, provider)));
 }
Exemplo n.º 7
0
 public static Maybe <long> ParseToLong(this Maybe <string> source, NumberStyles style)
 {
     return(source.FlatMap(x => LongParser.Parse(x, style)));
 }
Exemplo n.º 8
0
 public static Maybe <long> ParseToLong(this string source, NumberStyles style, IFormatProvider provider)
 {
     return(LongParser.Parse(source, style, provider));
 }
Exemplo n.º 9
0
 public static Maybe <long> ParseToLong(this string source, NumberStyles style)
 {
     return(LongParser.Parse(source, style));
 }
 public static Either <TLeft, long> ParseToLong <TLeft>(this string source, TLeft left)
 {
     return(LongParser.Parse(source, left));
 }