Ejemplo n.º 1
0
 public Deserializer(CMS_File _cmsFile, string location)
 {
     saveLocation = location;
     cmsFile      = _cmsFile;
     Validation();
     Write();
     File.WriteAllBytes(saveLocation, bytes.ToArray());
 }
Ejemplo n.º 2
0
        public Deserializer(string location)
        {
            saveLocation = String.Format("{0}/{1}", Path.GetDirectoryName(location), Path.GetFileNameWithoutExtension(location));
            YAXSerializer serializer = new YAXSerializer(typeof(CMS_File), YAXSerializationOptions.DontSerializeNullObjects);

            cmsFile = (CMS_File)serializer.DeserializeFromFile(location);
            Validation();
            Write();
            File.WriteAllBytes(saveLocation, bytes.ToArray());
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Parse only. No XML saving.
 /// </summary>
 /// <param name="_bytes"></param>
 public Parser(byte[] _bytes)
 {
     rawBytes = _bytes;
     bytes    = rawBytes.ToList();
     if (bytes != null)
     {
         Parse();
     }
     else
     {
         cmsFile = null;
     }
 }
Ejemplo n.º 4
0
 public Deserializer(CMS_File _cmsFile)
 {
     cmsFile = _cmsFile;
     Validation();
     Write();
 }