public static async Task <ExpungeInfo> FetchAsync(GalleryInfo galleryInfo, CancellationToken token = default) { var r = new ExpungeInfo(galleryInfo); await r.RefreshAsync(token); return(r); }
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; })); }