Exemplo n.º 1
0
 /// <summary>
 /// Create a QED file from a QED_File object.
 /// </summary>
 public Deserializer(QED_File _qedFile, string _saveLocation)
 {
     saveLocation  = _saveLocation;
     qed_File      = _qedFile;
     consoleActive = false;
     ValidateFile();
     WriteBinaryFile();
 }
Exemplo n.º 2
0
        public Deserializer(string location)
        {
            saveLocation = String.Format("{0}/{1}", Path.GetDirectoryName(location), Path.GetFileNameWithoutExtension(location));
            YAXSerializer serializer = new YAXSerializer(typeof(QED_File), YAXSerializationOptions.DontSerializeNullObjects);

            qed_File = (QED_File)serializer.DeserializeFromFile(location);
            ValidateFile();
            WriteBinaryFile();
            File.WriteAllBytes(saveLocation, bytes.ToArray());
        }