Esempio n. 1
0
        public async Task <bool> DeleteItemAsync(int index)
        {
            using (var doc = _db.GetDocument(CoreApp.DocId))
                using (var mdoc = doc.ToMutable())
                    using (MutableArrayObject listItems = mdoc.GetArray(CoreApp.ArrKey)) {
                        listItems.RemoveAt(index);
                        _db.Save(mdoc);
                    }

            _items.Remove(index);

            return(await Task.FromResult(true));
        }