private static void Save(LocationTagHolderServices taglist) { FileHelper.CreateBackUp(Configuration.Consts.WorkFolder, GetFileName); XmlSerializer xs = new XmlSerializer(typeof(LocationTagHolderServices)); using (TextWriter tw = new StreamWriter(Configuration.Consts.WorkFolder + GetFileName)) { xs.Serialize(tw, taglist); } }
public static LocationTagHolderServices Load() { try { XmlSerializer xs = new XmlSerializer(typeof(LocationTagHolderServices)); using (var sr = new StreamReader(Configuration.Consts.WorkFolder + GetFileName)) { return((LocationTagHolderServices)xs.Deserialize(sr)); } } catch { } LocationTagHolderServices locationTagHolderServices = new LocationTagHolderServices(); return(locationTagHolderServices); }
public void Save() { LocationTagHolderServices.Save(this); }