Exemple #1
0
        public async Task <string> Save(string deckId, Deck deck)
        {
            var filename = string.Format("{0}.json", deckId);
            var json     = JsonConvert.SerializeObject(deck);
            var data     = Encoding.ASCII.GetBytes(json);
            await _storage.WriteAsync(filename, data);

            return(deckId);
        }
 public async Task Save(IEnumerable <Contact> target, string filename)
 {
     var json = JsonConvert.SerializeObject(target);
     var data = Encoding.ASCII.GetBytes(json);
     await storage.WriteAsync(filename, data);
 }