using System.IO;
using System.Xml.Serialization;
namespace MediaBrowser.Controller.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);
            }
        }
    }
}