public static PresetData Deserialize(string xmlFileLocation)
        {
            if (!File.Exists(xmlFileLocation))
            {
                throw new FileNotFoundException(xmlFileLocation);
            }

            var serializer = new XmlSerializer(typeof(PresetData));

            serializer.UnknownNode += (ss, ee) => { throw new InvalidOperationException("Deserialize found unknown node"); };
            using (var fileStream = new FileStream(xmlFileLocation, FileMode.Open))
            {
                var        reader = new XmlTextReader(fileStream);
                PresetData data   = (PresetData)serializer.Deserialize(reader);

                // Removing protected presets from file data
                var array = new Preset[data.Presets.Count];
                data.Presets.CopyTo(array, 0);

                foreach (var item in array)
                {
                    if (PresetDataManager.IsProtectedPreset(item.Name))
                    {
                        data.Presets.Remove(item);
                    }
                }

                InsertImuttablePresets(data);
                return(data);
            }
        }
        public void Serialize(string xmlFileLocation)
        {
            var filteredPresets = new ObservableCollection <Preset>();

            foreach (var preset in this.Presets)
            {
                if (PresetDataManager.IsProtectedPreset(preset.Name))
                {
                    continue;
                }

                filteredPresets.Add(preset);
            }

            var filteredData = new PresetData();

            filteredData.Presets = filteredPresets;

            using (var writer = new StreamWriter(path: xmlFileLocation, append: false, encoding: Encoding.Unicode))
            {
                var serializer = new XmlSerializer(this.GetType());
                serializer.Serialize(writer, filteredData);
            }
        }