Esempio n. 1
0
 public void Cancel(ArtworkGrid artworkGrid)
 {
     lock (SyncRoot)
     {
         this.Queue.Remove(artworkGrid);
     }
 }
Esempio n. 2
0
        public Task Load(ArtworkGrid artworkGrid)
        {
            lock (SyncRoot)
            {
                this.Queue.Add(artworkGrid);
            }
            return(this.Factory.StartNew(() =>
            {
                lock (SyncRoot)
                {
                    if (!this.Queue.Contains(artworkGrid))
                    {
#if NET40
                        return TaskEx.FromResult(false);
#else
                        return Task.CompletedTask;
#endif
                    }
                }
                return artworkGrid.Refresh();
            }));
        }