コード例 #1
0
 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)));
 }
コード例 #2
0
 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)));
 }
コード例 #3
0
 public static Either <TLeft, long> ParseToLong <TLeft>(
     this string source,
     NumberStyles style,
     IFormatProvider provider,
     TLeft left)
 {
     return(LongParser.Parse <TLeft>(source, style, provider, left));
 }
コード例 #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);
        }
コード例 #5
0
 public static Maybe <long> ParseToLong(this string source)
 {
     return(LongParser.Parse(source));
 }
コード例 #6
0
 public static Maybe <long> ParseToLong(this Maybe <string> source, NumberStyles style, IFormatProvider provider)
 {
     return(source.FlatMap(x => LongParser.Parse(x, style, provider)));
 }
コード例 #7
0
 public static Maybe <long> ParseToLong(this Maybe <string> source, NumberStyles style)
 {
     return(source.FlatMap(x => LongParser.Parse(x, style)));
 }
コード例 #8
0
 public static Maybe <long> ParseToLong(this string source, NumberStyles style, IFormatProvider provider)
 {
     return(LongParser.Parse(source, style, provider));
 }
コード例 #9
0
 public static Maybe <long> ParseToLong(this string source, NumberStyles style)
 {
     return(LongParser.Parse(source, style));
 }
コード例 #10
0
 public static Either <TLeft, long> ParseToLong <TLeft>(this string source, TLeft left)
 {
     return(LongParser.Parse(source, left));
 }