Example #1
0
        public static async Task <ExpungeInfo> FetchAsync(GalleryInfo galleryInfo, CancellationToken token = default)
        {
            var r = new ExpungeInfo(galleryInfo);
            await r.RefreshAsync(token);

            return(r);
        }
Example #2
0
 public static IAsyncOperation <ExpungeInfo> FetchAsync(GalleryInfo galleryInfo)
 {
     return(AsyncInfo.Run(async token =>
     {
         var r = new ExpungeInfo(galleryInfo);
         var u = r.RefreshAsync();
         token.Register(u.Cancel);
         await u;
         token.ThrowIfCancellationRequested();
         return r;
     }));
 }