public static UpdateFileInfo LoadUpdateFileFromStream(Stream xmlStream) { XmlSerializer serializer = new XmlSerializer(typeof(UpdateFileInfo)); XmlTextReader xmlTextReader = new XmlTextReader(xmlStream); _updateFile = (UpdateFileInfo)serializer.Deserialize(xmlTextReader); return _updateFile; }
public static UpdateFileInfo LoadUpdateFile(string fileName) { XmlSerializer serializer = new XmlSerializer(typeof(UpdateFileInfo)); XmlTextReader xmlTextReader = new XmlTextReader(fileName); _updateFile = (UpdateFileInfo)serializer.Deserialize(xmlTextReader); return _updateFile; }
public static void SaveUpdateFile(string fileName, UpdateFileInfo updateFile) { XmlSerializer serializer = new XmlSerializer(typeof(UpdateFileInfo)); using (FileStream writer = new FileStream(fileName, FileMode.Create, FileAccess.ReadWrite, FileShare.Read)) { serializer.Serialize(writer, updateFile); } }
public static UpdateFileInfo LoadUpdateFileFromStream(Stream xmlStream) { XmlSerializer serializer = new XmlSerializer(typeof(UpdateFileInfo)); XmlTextReader xmlTextReader = new XmlTextReader(xmlStream); _updateFile = (UpdateFileInfo)serializer.Deserialize(xmlTextReader); return(_updateFile); }
public static UpdateFileInfo LoadUpdateFile(string fileName) { XmlSerializer serializer = new XmlSerializer(typeof(UpdateFileInfo)); XmlTextReader xmlTextReader = new XmlTextReader(fileName); _updateFile = (UpdateFileInfo)serializer.Deserialize(xmlTextReader); return(_updateFile); }