Exemplo n.º 1
0
 public static Versions LoadVersions(string filename)
 {
     if (!File.Exists(filename))
     {
         return(new Versions());
     }
     try
     {
         using (var stream = File.OpenRead(filename))
         {
             var reader = new BinaryReader(stream);
             var ver    = new Versions();
             ver.Deserialize(reader);
             return(ver);
         }
     }
     catch (Exception e)
     {
         Debug.LogException(e);
         return(new Versions());
     }
 }