wasSharp – Diff between revs 18 and 27

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 18 Rev 27
Line 14... Line 14...
14 { 14 {
15 public static class WebExtensions 15 public static class WebExtensions
16 { 16 {
17 private static readonly Func<string, string> directURIEscapeDataString = 17 private static readonly Func<string, string> directURIEscapeDataString =
18 ((Expression<Func<string, string>>) 18 ((Expression<Func<string, string>>)
19 (data => string.Join("", Enumerable.Range(0, (data.Length + 32765)/32766).AsParallel() 19 (data => string.Join("", Enumerable.Range(0, (data.Length + 32765) / 32766).AsParallel()
20 .Select(o => Uri.EscapeDataString(data.Substring(o*32766, Math.Min(32766, data.Length - o*32766)))) 20 .Select(o => Uri.EscapeDataString(data.Substring(o * 32766, Math.Min(32766, data.Length - o * 32766))))
21 .ToArray()))).Compile(); 21 .ToArray()))).Compile();
Line 22... Line 22...
22   22  
23 private static readonly Func<string, string> directURIUnescapeDataString = 23 private static readonly Func<string, string> directURIUnescapeDataString =
24 ((Expression<Func<string, string>>) 24 ((Expression<Func<string, string>>)
25 (data => string.Join("", Enumerable.Range(0, (data.Length + 32765)/32766).AsParallel() 25 (data => string.Join("", Enumerable.Range(0, (data.Length + 32765) / 32766).AsParallel()
26 .Select( 26 .Select(
27 o => Uri.UnescapeDataString(data.Substring(o*32766, Math.Min(32766, data.Length - o*32766)))) 27 o => Uri.UnescapeDataString(data.Substring(o * 32766, Math.Min(32766, data.Length - o * 32766))))
Line 28... Line 28...
28 .ToArray()))).Compile(); 28 .ToArray()))).Compile();
29   29  
30 /////////////////////////////////////////////////////////////////////////// 30 ///////////////////////////////////////////////////////////////////////////
Line 89... Line 89...
89 ).Split(':'); 89 ).Split(':');
90 long port; 90 long port;
91 return split.Length <= 1 || !long.TryParse(split[1], out port) ? 80 : port; 91 return split.Length <= 1 || !long.TryParse(split[1], out port) ? 80 : port;
92 } 92 }
93 } 93 }
94 } -  
95   94 }
-   95