Skip to content

Instantly share code, notes, and snippets.

@nigel-sampson
Created January 10, 2013 00:09
Show Gist options
  • Save nigel-sampson/4498210 to your computer and use it in GitHub Desktop.
Save nigel-sampson/4498210 to your computer and use it in GitHub Desktop.
Returning Null
public class RetailersService : AppServiceBase
{
public async Task<IList<Retailer>> GetRetailersAsync()
{
return await BlobCache.LocalMachine.GetOrFetchObject("retailers", DownloadRetailersAsync);
}
private Task<IList<Retailer>> DownloadRetailersAsync()
{
IList<Retailer> retailers = Enumerable.Range(0, 20)
.Select(i => new Retailer { Id = i, Name = String.Format("Retailer {0}", i) })
.ToList();
return Task.FromResult(retailers);
}
}
@shiftkey
Copy link

On WinRT? See reactiveui/Akavache#21 as I hit the same issue on the weekend...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment