示例#1
0
 public Deserializer(IDB_File _idbFile, string _saveLocation)
 {
     saveLocation = _saveLocation;
     idbFile      = _idbFile;
     Validation();
     Write();
     File.WriteAllBytes(this.saveLocation, bytes.ToArray());
 }
示例#2
0
        public Deserializer(string location)
        {
            saveLocation = String.Format("{0}/{1}", Path.GetDirectoryName(location), Path.GetFileNameWithoutExtension(location));
            YAXSerializer serializer = new YAXSerializer(typeof(IDB_File), YAXSerializationOptions.DontSerializeNullObjects);

            idbFile = (IDB_File)serializer.DeserializeFromFile(location);
            Validation();
            Write();
            File.WriteAllBytes(saveLocation, bytes.ToArray());
        }
示例#3
0
 public Parser(byte[] _bytes)
 {
     rawBytes = _bytes;
     bytes    = rawBytes.ToList();
     if (bytes != null)
     {
         Parse();
     }
     else
     {
         idbFile = null;
     }
 }
示例#4
0
 public Deserializer(IDB_File _idbFile)
 {
     idbFile = _idbFile;
     Validation();
     Write();
 }