From 767cdc1f6f6a63ce997fc9476911e2c361f9d402 Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Wed, 20 Feb 2013 20:33:05 -0500 Subject: Pushing missing changes --- .../Localization/LocalizedStringData.cs | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 MediaBrowser.Common/Localization/LocalizedStringData.cs (limited to 'MediaBrowser.Common/Localization/LocalizedStringData.cs') diff --git a/MediaBrowser.Common/Localization/LocalizedStringData.cs b/MediaBrowser.Common/Localization/LocalizedStringData.cs new file mode 100644 index 000000000..a507c7b6b --- /dev/null +++ b/MediaBrowser.Common/Localization/LocalizedStringData.cs @@ -0,0 +1,51 @@ +using System.IO; +using System.Xml.Serialization; + +namespace MediaBrowser.Common.Localization +{ + /// + /// Class LocalizedStringData + /// + public class LocalizedStringData + { + /// + /// The this version + /// + [XmlIgnore] + public string ThisVersion = "1.0000"; + /// + /// The prefix + /// + [XmlIgnore] + public string Prefix = ""; + /// + /// The file name + /// + public string FileName; //this is public so it will serialize and we know where to save ourselves + /// + /// The version + /// + public string Version = ""; //this will get saved so we can check it against us for changes + + /// + /// Saves this instance. + /// + public void Save() + { + Save(FileName); + } + + /// + /// Saves the specified file. + /// + /// The file. + public void Save(string file) + { + var xs = new XmlSerializer(GetType()); + using (var fs = new FileStream(file, FileMode.Create, FileAccess.Write, FileShare.None)) + { + xs.Serialize(fs, this); + } + } + } +} -- cgit v1.2.3