Esempio n. 1
0
        public static async Task <List <Utente> > deserializza()
        {
            string json = await LetturaFile.ReadAllTextAsync(filename);

            List <Utente> u = JsonConvert.DeserializeObject <List <Utente> >(json);

            return(u);
        }
Esempio n. 2
0
 private static async void riempiLista()
 {
     try
     {
         if (await LetturaFile.IsFileExistAsync("Utenti.json"))
         {
             utenti = await GestoreJson.deserializza();
         }
     }
     catch (NullReferenceException)
     {
     }
 }
Esempio n. 3
0
 public static async Task Serializza(List <Utente> u)
 {
     string json = JsonConvert.SerializeObject(u, Formatting.Indented);
     await LetturaFile.WriteTextAllAsync(filename, json);
 }