Beispiel #1
0
        public static TObject Deserialize <TObject>(Stream inStream) where TObject : class
        {
            using (MemoryStream ms = new MemoryStream())
            {
                XmlSerializer xs     = new XmlSerializer(typeof(TObject));
                var           xmlDoc = CryXmlSerializer.ReadStream(inStream);

                xmlDoc.Save(ms);
                ms.Seek(0, SeekOrigin.Begin);
                return(xs.Deserialize(ms) as TObject);
            }
        }
 public static XmlDocument ReadFile(String inFile, ByteOrderEnum byteOrder = ByteOrderEnum.AutoDetect, Boolean writeLog = false)
 {
     return(CryXmlSerializer.ReadStream(File.OpenRead(inFile), byteOrder, writeLog));
 }
Beispiel #3
0
 public static XmlDocument ReadFile(String inFile, Boolean writeLog = false)
 {
     return(CryXmlSerializer.ReadStream(File.OpenRead(inFile), writeLog));
 }