wasStitchNET – Diff between revs 10 and 13
?pathlinks?
Rev 10 | Rev 13 | |||
---|---|---|---|---|
Line 13... | Line 13... | |||
13 | using wasDAVClient.Helpers; |
13 | using wasDAVClient.Helpers; |
|
14 | using wasSharp; |
14 | using wasSharp; |
|
15 | using wasSharp.Linq; |
15 | using wasSharp.Linq; |
|
16 | using wasSharp.Web.Utilities; |
16 | using wasSharp.Web.Utilities; |
|
17 | using wasSharpNET.Cryptography; |
17 | using wasSharpNET.Cryptography; |
|
- | 18 | using SHA1 = System.Security.Cryptography.SHA1; |
||
Line 18... | Line 19... | |||
18 | |
19 | |
|
19 | namespace wasStitchNET.Repository |
20 | namespace wasStitchNET.Repository |
|
20 | { |
21 | { |
|
21 | public class Tools |
22 | public class Tools |
|
Line 77... | Line 78... | |||
77 | /// </summary> |
78 | /// </summary> |
|
78 | /// <param name="server">the Stitch server to use</param> |
79 | /// <param name="server">the Stitch server to use</param> |
|
79 | /// <param name="release">the release to list files for</param> |
80 | /// <param name="release">the release to list files for</param> |
|
80 | /// <param name="timeout">the timeout connecting to the Stitch repository</param> |
81 | /// <param name="timeout">the timeout connecting to the Stitch repository</param> |
|
81 | /// <returns>a list of Corrade files contained in the repository</returns> |
82 | /// <returns>a list of Corrade files contained in the repository</returns> |
|
82 | public static IEnumerable<KeyValuePair<string, string>> GetReleaseFileHashes(string server, Version release, int timeout) |
83 | public static IEnumerable<KeyValuePair<string, string>> GetReleaseFileHashes(string server, Version release, |
|
- | 84 | int timeout) |
||
83 | { |
85 | { |
|
84 | try |
86 | try |
|
85 | { |
87 | { |
|
86 | using (var client = new Client(new NetworkCredential()) |
88 | using (var client = new Client(new NetworkCredential()) |
|
87 | { |
89 | { |
|
Line 114... | Line 116... | |||
114 | STITCH_CONSTANTS.UPDATE_PATH, |
116 | STITCH_CONSTANTS.UPDATE_PATH, |
|
115 | STITCH_CONSTANTS.PROGRESSIVE_PATH, |
117 | STITCH_CONSTANTS.PROGRESSIVE_PATH, |
|
116 | $"{release.Major}.{release.Minor}", |
118 | $"{release.Major}.{release.Minor}", |
|
117 | STITCH_CONSTANTS.UPDATE_DATA_PATH |
119 | STITCH_CONSTANTS.UPDATE_DATA_PATH |
|
118 | })), |
120 | })), |
|
119 | o => System.Security.Cryptography.SHA1.Create().ToHex(client.Download(o.Href).Result)); |
121 | o => SHA1.Create().ToHex(client.Download(o.Href).Result)); |
|
120 | } |
122 | } |
|
121 | } |
123 | } |
|
122 | catch (wasDAVException ex) |
124 | catch (wasDAVException ex) |
|
123 | { |
125 | { |
|
124 | throw new StitchException(ex); |
126 | throw new StitchException(ex); |
|
125 | } |
127 | } |
|
126 | } |
128 | } |
|
127 | } |
129 | } |
|
128 | } |
130 | } |
|
129 | |
131 | |