Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- XElement xe = XElement.Load(stm); //Stm - Stream
- var k = xe.Descendants("post").Select(r => (string)r.Attribute("file_url"));
- if (!LoliGet.CancellationPending)
- try
- {
- k.AsParallel().WithDegreeOfParallelism(2).WithCancellation(this.CancelLoad.Token).ForAll(r =>
- {
- if (!LoliGet.CancellationPending)
- {
- this.GetImage(r, ib.Name(r));
- }
- });
- }
- catch (OperationCanceledException ex)
- {
- }
- else
- return;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement