wasStitchNET – Diff between revs 3 and 5
?pathlinks?
Rev 3 | Rev 5 | |||
---|---|---|---|---|
Line 4... | Line 4... | |||
4 | // rights of fair usage, the disclaimer and warranty conditions. // |
4 | // rights of fair usage, the disclaimer and warranty conditions. // |
|
5 | /////////////////////////////////////////////////////////////////////////// |
5 | /////////////////////////////////////////////////////////////////////////// |
|
Line 6... | Line 6... | |||
6 | |
6 | |
|
7 | using System; |
7 | using System; |
|
8 | using System.Collections.Generic; |
- | ||
9 | using System.IO; |
8 | using System.Collections.Generic; |
|
10 | using System.Linq; |
9 | using System.Linq; |
|
11 | using System.Net; |
- | ||
12 | using System.Security.Cryptography; |
10 | using System.Net; |
|
13 | using System.Threading.Tasks; |
11 | using System.Threading.Tasks; |
|
14 | using wasDAVClient; |
12 | using wasDAVClient; |
|
15 | using wasSharp; |
13 | using wasSharp; |
|
16 | using wasSharp.Linq; |
14 | using wasSharp.Linq; |
|
Line 49... | Line 47... | |||
49 | Constants.DavDepth.ALL) |
47 | Constants.DavDepth.ALL) |
|
50 | ) |
48 | ) |
|
51 | .Select(o => string.Join(Constants.DIRECTORY_SEPARATOR, |
49 | .Select(o => string.Join(Constants.DIRECTORY_SEPARATOR, |
|
52 | o.Href.PathSplit(Constants.DIRECTORY_SEPARATOR.First()) |
50 | o.Href.PathSplit(Constants.DIRECTORY_SEPARATOR.First()) |
|
53 | .Select(part => |
51 | .Select(part => |
|
54 | WebExtensions.URLUnescapeDataString( |
- | ||
55 | part.Trim(Constants.DIRECTORY_SEPARATOR.First()) |
52 | part.Trim(Constants.DIRECTORY_SEPARATOR.First()).URLUnescapeDataString() |
|
56 | ) |
- | ||
57 | ) |
53 | ) |
|
58 | .Where(part => !string.IsNullOrEmpty(part)) |
54 | .Where(part => !string.IsNullOrEmpty(part)) |
|
59 | .SequenceExceptAny(new[] { |
55 | .SequenceExceptAny(new[] { |
|
60 | STITCH_CONSTANTS.UPDATE_PATH, |
56 | STITCH_CONSTANTS.UPDATE_PATH, |
|
61 | STITCH_CONSTANTS.PROGRESSIVE_PATH, |
57 | STITCH_CONSTANTS.PROGRESSIVE_PATH, |
|
Line 96... | Line 92... | |||
96 | .Result |
92 | .Result |
|
97 | .AsParallel() |
93 | .AsParallel() |
|
98 | .Where(item => !item.IsCollection) |
94 | .Where(item => !item.IsCollection) |
|
99 | .ToDictionary(o => string.Join(Constants.DIRECTORY_SEPARATOR, |
95 | .ToDictionary(o => string.Join(Constants.DIRECTORY_SEPARATOR, |
|
100 | o.Href.PathSplit(Constants.DIRECTORY_SEPARATOR.First()) |
96 | o.Href.PathSplit(Constants.DIRECTORY_SEPARATOR.First()) |
|
101 | .Select(part => WebExtensions.URLUnescapeDataString( |
- | ||
102 | part.Trim(Constants.DIRECTORY_SEPARATOR.First()) |
97 | .Select(part => part.Trim(Constants.DIRECTORY_SEPARATOR.First()).URLUnescapeDataString() |
|
103 | ) |
- | ||
104 | ) |
98 | ) |
|
105 | .Where(part => !string.IsNullOrEmpty(part)) |
99 | .Where(part => !string.IsNullOrEmpty(part)) |
|
106 | .SequenceExceptAny(new[] { |
100 | .SequenceExceptAny(new[] { |
|
107 | STITCH_CONSTANTS.UPDATE_PATH, |
101 | STITCH_CONSTANTS.UPDATE_PATH, |
|
108 | STITCH_CONSTANTS.PROGRESSIVE_PATH, |
102 | STITCH_CONSTANTS.PROGRESSIVE_PATH, |