Beispiel #1
0
 public void LoadIndexFrom(string filename)
 {
     try
     {
         // deserialize JSON directly from a file
         using (StreamReader file = File.OpenText(filename))
         {
             JsonSerializer serializer = new JsonSerializer();
             this.Items = (IndexItems)serializer.Deserialize(file, typeof(IndexItems));
         }
     }
     catch (System.Exception)
     {
     }
 }
Beispiel #2
0
 public Index()
 {
     this.Items = new IndexItems();
 }