Ejemplo n.º 1
0
        public async Task <IList <Item> > GetListItems(int listId)
        {
            var data = await TinyCache.RunAsync("listItems" + listId, async() => {
                var ret = await _client.GetListItemsAsync(listId);
                return(ret);
            });

            return(data);
        }
Ejemplo n.º 2
0
        public async Task <IList <Item> > GetListItems(int listId)
        {
            var data = await TinyCache.TinyCache.RunAsync(ItemListKey(listId), async() =>
            {
                return(await _client.GetListItemsAsync(listId));
            }, _fetchPolicy);

            var list = _currentLists.FirstOrDefault(d => d.Id == listId);

            MergeListItems(list, data);
            return(list.Items);
        }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='listid'>
 /// </param>
 public static IList <Item> GetListItems(this IShoppingAPI operations, int listid)
 {
     return(operations.GetListItemsAsync(listid).GetAwaiter().GetResult());
 }