Esempio n. 1
0
        public async Task <Deck> GetById(string deckId)
        {
            var filename = string.Format("{0}.json", deckId);
            var json     = await _storage.ReadAsStringAsync(filename);

            return(JsonConvert.DeserializeObject <Deck>(json));
        }
        public async Task <IEnumerable <Contact> > Get(string filename)
        {
            var json = await storage.ReadAsStringAsync(filename);

            if (string.IsNullOrEmpty(json))
            {
                return(null);
            }

            return(JsonConvert.DeserializeObject <IEnumerable <Contact> >(json));
        }