public Parser(byte[] _bytes) { eskFile = new ESK_File(); rawBytes = _bytes; bytes = rawBytes.ToList(); Parse(); }
public Deserializer(string location) { saveLocation = String.Format("{0}/{1}", Path.GetDirectoryName(location), Path.GetFileNameWithoutExtension(location)); YAXSerializer serializer = new YAXSerializer(typeof(ESK_File), YAXSerializationOptions.DontSerializeNullObjects); eskFile = (ESK_File)serializer.DeserializeFromFile(location); WriteFile(); File.WriteAllBytes(saveLocation, bytes.ToArray()); }
public Parser(string location, bool writeXml) { eskFile = new ESK_File(); rawBytes = File.ReadAllBytes(location); Parse(); if (writeXml) { YAXSerializer serializer = new YAXSerializer(typeof(ESK_File)); serializer.SerializeToFile(eskFile, location + ".xml"); } }
public Deserializer(ESK_File _eskFile, string path) { eskFile = _eskFile; WriteFile(); File.WriteAllBytes(path, bytes.ToArray()); }
public Deserializer(ESK_File _eskFile) { eskFile = _eskFile; WriteFile(); }
public Parser(byte[] _bytes) { eskFile = new ESK_File(); rawBytes = _bytes; Parse(); }