Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.52 KB | None | 0 0
  1. XElement xe = XElement.Load(stm); //Stm - Stream
  2. var k = xe.Descendants("post").Select(r => (string)r.Attribute("file_url"));
  3.  
  4. if (!LoliGet.CancellationPending)
  5.     try
  6.     {
  7.            k.AsParallel().WithDegreeOfParallelism(2).WithCancellation(this.CancelLoad.Token).ForAll(r =>
  8.                {
  9.                 if (!LoliGet.CancellationPending)
  10.             {
  11.                     this.GetImage(r, ib.Name(r));
  12.                 }
  13.                });
  14.     }
  15.     catch (OperationCanceledException ex)
  16.     {
  17.         }
  18.         else
  19.         return;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement