diff options
| author | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-20 20:33:05 -0500 |
|---|---|---|
| committer | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-20 20:33:05 -0500 |
| commit | 767cdc1f6f6a63ce997fc9476911e2c361f9d402 (patch) | |
| tree | 49add55976f895441167c66cfa95e5c7688d18ce /MediaBrowser.Common/Localization/LocalizedStringData.cs | |
| parent | 845554722efaed872948a9e0f7202e3ef52f1b6e (diff) | |
Pushing missing changes
Diffstat (limited to 'MediaBrowser.Common/Localization/LocalizedStringData.cs')
| -rw-r--r-- | MediaBrowser.Common/Localization/LocalizedStringData.cs | 51 |
1 files changed, 51 insertions, 0 deletions
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 +{ + /// <summary> + /// Class LocalizedStringData + /// </summary> + public class LocalizedStringData + { + /// <summary> + /// The this version + /// </summary> + [XmlIgnore] + public string ThisVersion = "1.0000"; + /// <summary> + /// The prefix + /// </summary> + [XmlIgnore] + public string Prefix = ""; + /// <summary> + /// The file name + /// </summary> + public string FileName; //this is public so it will serialize and we know where to save ourselves + /// <summary> + /// The version + /// </summary> + public string Version = ""; //this will get saved so we can check it against us for changes + + /// <summary> + /// Saves this instance. + /// </summary> + public void Save() + { + Save(FileName); + } + + /// <summary> + /// Saves the specified file. + /// </summary> + /// <param name="file">The file.</param> + 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); + } + } + } +} |
