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)); }
public static XmlDocument ReadFile(String inFile, Boolean writeLog = false) { return(CryXmlSerializer.ReadStream(File.OpenRead(inFile), writeLog)); }