Example #1
0
 public void TakeSnapshot(Snapshot snapshot)
 {
     File.WriteAllText(SnapshotFile, snapshot.ToJson(), new ASCIIEncoding());
 }
Example #2
0
 public void FromSnapshot(Snapshot snapshot)
 {
     lock (droplets)
     {
         foreach (DropletEntry dropletEntry in snapshot.Entries)
         {
             foreach (InstanceEntry instanceEntry in dropletEntry.Instances)
             {
                 this.Add(dropletEntry.DropletID, instanceEntry.Instance);
             }
         }
     }
 }