Esempio n. 1
0
        public async Task <IList <ShoppingList> > GetShoppingLists()
        {
            var data = await TinyCache.RunAsync <IList <ShoppingList> >("shoppingLists10", async() => {
                var ret = await _client.GetShoppingListsAsync();
                return(ret);
            });

            return(data);
        }
Esempio n. 2
0
        public async Task <IList <ShoppingList> > GetShoppingLists()
        {
            var data = await TinyCache.TinyCache.RunAsync(LISTKEY, async() =>
            {
                return(await _client.GetShoppingListsAsync());
            }, _fetchPolicy);

            Merge(data);
            return(_currentLists);
        }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IList <ShoppingList> GetShoppingLists(this IShoppingAPI operations)
 {
     return(operations.GetShoppingListsAsync().GetAwaiter().GetResult());
 }